Returns true if the count is as specified.
public static bool CountIsExactly<T>(this IEnumerable<T> source, int count)
parameter | description |
---|---|
T | The type of the element. |
source | The sequence. |
count | The count. |
True if the count is as specified.
This method will often be faster than calling Enumerable.Count() and testing that value when the count may be much larger than the count being tested.