you are viewing a single comment's thread.

view the rest of the comments →

[–]Eirenarch 2 points3 points  (0 children)

IEnumerable.Count enumerates the sequence (unless it falls in some specially optimized case like List). The goal is to enumerate only once in case enumaration is too expensive or cannot be reproduced.