The Any
method can cause the enumeration of the IEnumerable
, if it doesn't have another way to determine the result. In some cases it can be a problem, for instance if the IEnumerable
instance is actually an IQueryable
that will cause a database query or web service call to be executed. Now, if it's just an in-memory collection, it's not really an issue, because enumerating the collection won't have noticeable side effects. And anyway, Any
will use the Count
property if the sequence implements ICollection
, so it won't cause an enumeration.