Will First() perform the OrderBy()?
- by Martin
Is there any difference in (asymptotic) performance between
Orders.OrderBy(order => order.Date).First()
and
Orders.Where(order => order.Date == Orders.Max(x => x.Date));
i.e. will First() perform the OrderBy()? I'm guessing no. MSDN says enumerating the collection via foreach och GetEnumerator does but the phrasing does not exclude other extensions.