ForAll
Tests if all elements of the collection satisfy the given predicate
.
If any application returns false
then the overall result is false
and no further elements are tested. Otherwise, true
is returned.
WARNING
This function causes
IEnumerable<T>
evaluation.
Parameters
Returns
Func<T, bool> predicate
IEnumerable<T> source
bool
Usage
Verifying that all values in the collection are even numbers
Last updated
Was this helpful?