FindIndex()

List::FindIndex(System::Predicate<T>) method

Looks for element adhering to specific predicate.

int System::Collections::Generic::List<T>::FindIndex(System::Predicate<T> match)

Arguments

ParameterTypeDescription
matchSystem::Predicate<T>Predicate to check elements with.

Return Value

Index of matching element or -1 if not found.

List::FindIndex(int, System::Predicate<T>) method

Looks for element adhering to specific predicate.

int System::Collections::Generic::List<T>::FindIndex(int startIndex, System::Predicate<T> match)

Arguments

ParameterTypeDescription
startIndexintIndex to start search from.
matchSystem::Predicate<T>Predicate to check elements with.

Return Value

Index of matching element or -1 if not found.

List::FindIndex(int, int, System::Predicate<T>) method

Looks for element adhering to specific predicate.

int System::Collections::Generic::List<T>::FindIndex(int startIndex, int count, System::Predicate<T> match)

Arguments

ParameterTypeDescription
startIndexintIndex to start search from.
countintNumber of elements to look through.
matchSystem::Predicate<T>Predicate to check elements with.

Return Value

Index of matching element or -1 if not found.

See Also