Click or drag to resize
AlgorithmsIndicesOfManyT Method (IListT, IEnumerableT, BinaryPredicateT)
Enumerates the indices of all the items in a list equal to one of several given items. The passed BinaryPredicate is used to determine if two items are "equal".

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

Parameters

list
Type: System.Collections.GenericIListT
The list to search.
itemsToLookFor
Type: System.Collections.GenericIEnumerableT
A collection of items to search for.
predicate
Type: X3Platform.CollectionsBinaryPredicateT
The BinaryPredicate used to compare items for "equality".

Type Parameters

T

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

Return Value

Type: IEnumerableInt32
An IEnumerable<T> that enumerates the indices of items "equal" to any of the items in the collection itemsToLookFor, using as the test for equality.
Remarks
Since an arbitrary BinaryPredicate is passed to this function, what is being removed need not be true equality. This methods finds last item X which satisfies BinaryPredicate(X,Y), where Y is one of the items in itemsToLookFor
See Also