FindIndex
Returns the index of the first element in the collection that satisfies the given predicate
.
Parameters
Returns
Func<T, bool> predicate
IEnumerable<T> source
int
Exceptions
Type
When
InvalidOperationException
The predicate function returns false for all elements.
Usage
Find the index ofthe first even number
Last updated
Was this helpful?