Click or drag to resize
AlgorithmsStableSortT Method (IEnumerableT, ComparisonT)
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 Comparison<T> delegate is used to compare the items in the collection.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static T[] StableSort<T>(
	IEnumerable<T> collection,
	Comparison<T> comparison
)

Parameters

collection
Type: System.Collections.GenericIEnumerableT
The collection to sort.
comparison
Type: SystemComparisonT
The comparison delegate used to compare items in the collection.

Type Parameters

T

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

Return Value

Type: T
An array containing the sorted version of the collection.
Remarks
Values are compared by using the IComparable<T> interfaces implementation on the type T.
See Also