AlgorithmsStableSortT Method (IEnumerableT, IComparerT) |
Creates a sorted version of a collection. The sort is stable, which means that if items X and Y are equal,
and X precedes Y in the unsorted collection, X will precede Y is the sorted collection. A supplied IComparer<T> is used
to compare the items in the collection.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static T[] StableSort<T>(
IEnumerable<T> collection,
IComparer<T> comparer
)
public:
generic<typename T>
static array<T>^ StableSort(
IEnumerable<T>^ collection,
IComparer<T>^ comparer
)
Parameters
- collection
- Type: System.Collections.GenericIEnumerableT
The collection to sort. - comparer
- Type: System.Collections.GenericIComparerT
The comparer instance used to compare items in the collection. Only
the Compare method is used.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.StableSort``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IComparer{``0})"]
Return Value
Type:
TAn array containing the sorted version of the collection.
See Also