Whats the best/easiest way to obtain a count of items within an IEnumerable collection without enumerating over all of the items in the collection?
Possible with LINQ or Lambda?
In any case, you have to loop through it. Linq offers the Count method:
Count
var result = myenum.Count();
1.4m articles
1.4m replys
5 comments
57.0k users