Friday, December 9, 2011

.First() works with both IEnumerable and List generics in C#

var foo = order.OrderItems.First().Quantity;

 
 

This has extensive detail on the subject.

No comments:

Post a Comment