Click or drag to resize

GenericExtensionsFindIndexT Method (IListT, Int32, PredicateT)

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ListT that extends from the specified index to the last element.

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public static int FindIndex<T>(
	this IList<T> source,
	int startIndex,
	Predicate<T> match
)

Parameters

source
Type: System.Collections.GenericIListT
IList to search
startIndex
Type: SystemInt32
The zero-based starting index of the search.
match
Type: SystemPredicateT
The PredicateT delegate that defines the conditions of the element to search for.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:DHI.Mike1D.Generic.GenericExtensions.FindIndex``1(System.Collections.Generic.IList{``0},System.Int32,System.Predicate{``0})"]

Return Value

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

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also