Click or drag to resize
AlgorithmsRemoveDuplicatesInPlaceT Method (IListT, IEqualityComparerT)
Remove subsequent consecutive equal items from a list or array. In each run of consecutive equal items in the list, all items after the first item in the run are removed. The replacement is done in-place, changing 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 void RemoveDuplicatesInPlace<T>(
	IList<T> list,
	IEqualityComparer<T> equalityComparer
)

Parameters

list
Type: System.Collections.GenericIListT
The list or array to process.
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.RemoveDuplicatesInPlace``1(System.Collections.Generic.IList{``0},System.Collections.Generic.IEqualityComparer{``0})"]

Remarks
Although arrays cast to IList<T> are normally read-only, this method will work correctly and modify an array passed as list.
See Also