I'm wondering if LINQ methods like .Last and .Skip are optimized for arrays, List and the such. E.g. for an array I could do _array[_array.Length]
to get the last element. Does _array.Last()
actually enumerate through all elements and then return the last or is there actually some optimization built in?
Might have to forgo fluency for performance if not.
Thanks.