Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms..::..FindFirstIndexWhere<(Of <(<'T>)>)> Method

Finds the index of the first item in a list that satisfies the condition defined by predicate.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public static int FindFirstIndexWhere<T>(
	IList<T> list,
	Predicate<T> predicate
)
Public Shared Function FindFirstIndexWhere(Of T) ( _
	list As IList(Of T), _
	predicate As Predicate(Of T) _
) As Integer
public:
generic<typename T>
static int^ FindFirstIndexWhere(
	IList<T>^ list, 
	Predicate<T>^ predicate
)

Type Parameters

T

Parameters

list
Type: IList<(Of <(<'T>)>)>
The list to search.
predicate
Type: Predicate<(Of <(<'T>)>)>
A delegate that defined the condition to check for.

Return Value

The index of the first item satisfying the condition. -1 if no such item exists in the list.