ListExtensions.IndexOf<T>
Extension Method in ListExtensions
Declaration
public static int IndexOf<T>(this List<T> list, Predicate<T> predicate)
Description
Returns the index of the first item in the list that satisfies the predicate.
Type Parameters
T | The type of the list. |
Parameters
list | The list to search in. |
predicate | The predicate to use. |
Returns
int | The index of the item, or -1 if not found. |