Table of Contents

Class ListExtensions

Namespace
Whim
Assembly
Whim.dll
Extension methods for IReadOnlyList<T>.
public static class ListExtensions
Inheritance
ListExtensions
Inherited Members

Methods

FindIndex<T>(IReadOnlyList<T>, Func<T, bool>)

Returns the index of the first element in the list that matches the predicate.
public static int FindIndex<T>(this IReadOnlyList<T> list, Func<T, bool> predicate)

Parameters

list IReadOnlyList<T>
The list to search.
predicate Func<T, bool>
The predicate to match.

Returns

int
The index of the first matching element, or -1 if no element matches.

Type Parameters

T
The type of elements in the list.