I don’t understand how Current can be null and the LINQ function Last() can return an object. I thought Last uses GetEnumerator and keeps going until current == null and returns the object. However as you can see the first GetEnumerator().Current is null and last somehow returns an object.
How does linq Last() work?
items.GetEnumerator().Current
items.Last()
From using Reflector on
System.Core.dll: