IEnumerable<Element>.Cast<SomeClass>().FirstOrDefault();
vs
IEnumerable<Element>.FirstOrDefault().Cast<SomeClass>();
The reason why I ask is, I see a lot of examples online using it in the first manner. However, is the second linq sequence better performance-wise, since it avoids casting all Elements in the IEnumerable first? Or maybe the first one is safer? Or are they actually doing exactly the same backstage?