AlgorithmsFirstConsecutiveWhereT Method |
Finds the first occurence of count consecutive items in the
list for which a given predicate returns true.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static int FirstConsecutiveWhere<T>(
IList<T> list,
int count,
Predicate<T> predicate
)
public:
generic<typename T>
static int FirstConsecutiveWhere(
IList<T>^ list,
int count,
Predicate<T>^ predicate
)
Parameters
- list
- Type: System.Collections.GenericIListT
The list to examine. - count
- Type: SystemInt32
The number of consecutive items to look for. The count must be at least 1. - predicate
- Type: SystemPredicateT
The predicate used to test each item.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.FirstConsecutiveWhere``1(System.Collections.Generic.IList{``0},System.Int32,System.Predicate{``0})"]
Return Value
Type:
Int32The index of the first item in the first run of
count items where
predicate
returns true for all items in the run, or -1 if no such run exists.
See Also