TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Rule:  12@103

Synopsis:Consider using Any() to determine whether an IEnumerable is empty
Language:C#
Severity Level:9
Category:Performance


Description:
In many cases using Any() is more efficient than Count(). With Count() you risk that iterating over the entire collection has a significant impact.


Literature References:
MS Design numerable.Count