Click or drag to resize
AlgorithmsFirstConsecutiveEqualT Method (IListT, Int32, IEqualityComparerT)
Finds the first occurence of count consecutive equal items in the list. A passed IEqualityComparer is used to determine equality.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static int FirstConsecutiveEqual<T>(
	IList<T> list,
	int count,
	IEqualityComparer<T> equalityComparer
)

Parameters

list
Type: System.Collections.GenericIListT
The list to examine.
count
Type: SystemInt32
The number of consecutive equal items to look for. The count must be at least 1.
equalityComparer
Type: System.Collections.GenericIEqualityComparerT
The IEqualityComparer<T> used to compare items for equality. Only the Equals method will be called.

Type Parameters

T

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

Return Value

Type: Int32
The index of the first item in the first run of count consecutive equal items, or -1 if no such run exists.
See Also