Method IndexOf
IndexOf<T>(IReadOnlyCollection<T>, Func<T, bool>)
Returns the index of the first element in the collection that matches the specified predicate.
public static int IndexOf<T>(this IReadOnlyCollection<T> self, Func<T, bool> predicate)
Parameters
self
IReadOnlyCollection<T>predicate
Func<T, bool>
Returns
Type Parameters
T
IndexOf<T>(IReadOnlyCollection<T>, T)
Returns the index of the first element in the collection that matches the specified predicate.
public static int IndexOf<T>(this IReadOnlyCollection<T> self, T toFind)
Parameters
self
IReadOnlyCollection<T>toFind
T
Returns
Type Parameters
T