|
|
|
|
|
by chrisb
5877 days ago
|
|
The .Count() method in LINQ to objects checks to see if the IEnumerable implements ICollection, and if so then just calls the .Count property. Of course, calling the .Count property yourself is more efficient, but not by orders of magnitude. |
|
I think there is still some validity in my post in confusing whether you are using native accessing or routing through an additional tool/library, but the fix definitely elimates the performance hit I was discussing, so much of my post was in error.
edit: Also 3.5 it seems, I need to be more up-to-date with my concerns.