ListUtility.FindIndex<T> method (1 of 2)

Returns the index of the first item that matches the predicate.

public static int FindIndex<T>(this IReadOnlyList<T> list, Func<T, bool> match)
parameter description
list The list.
match The delegate that defines the conditions of the element to search for.

See Also


ListUtility.FindIndex<T> method (2 of 2)

Returns the index of the first item that matches the predicate.

public static int FindIndex<T>(this IReadOnlyList<T> list, int startIndex, Func<T, bool> match)
parameter description
list The list.
startIndex The zero-based starting index of the search.
match The delegate that defines the conditions of the element to search for.

Return Value

The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

See Also