Click or drag to resize
AlgorithmsFirstIndexOfManyT Method (IListT, IEnumerableT)
Finds the index of the first item in a list equal to one of several given items.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static int FirstIndexOfMany<T>(
	IList<T> list,
	IEnumerable<T> itemsToLookFor
)

Parameters

list
Type: System.Collections.GenericIListT
The list to search.
itemsToLookFor
Type: System.Collections.GenericIEnumerableT
The items to search for.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.FirstIndexOfMany``1(System.Collections.Generic.IList{``0},System.Collections.Generic.IEnumerable{``0})"]

Return Value

Type: Int32
The index of the first item equal to any of the items in the collection itemsToLookFor. -1 if no such item exists in the list.
Remarks
The default sense of equality for T is used, as defined by T's implementation of IComparable<T>.Equals or object.Equals.
See Also