Algorithms..::..StableSort<(Of <(<'T>)>)> Method (IEnumerable<(Of <(<'T>)>)>, IComparer<(Of <(<'T>)>)>)
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:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
public static T[] StableSort<T>( IEnumerable<T> collection, IComparer<T> comparer ) where T : IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>
Public Shared Function StableSort(Of T As {IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T), IComparable(Of T)}) ( _ collection As IEnumerable(Of T), _ comparer As IComparer(Of T) _ ) As T()
public: generic<typename T> where T : IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T>, IComparable<T> static array<T>^ StableSort( IEnumerable<T>^ collection, IComparer<T>^ comparer )
Type Parameters
- T
Parameters
- collection
- Type: IEnumerable<(Of <(<'T>)>)>
The collection to sort.
- comparer
- Type: IComparer<(Of <(<'T>)>)>
The comparer instance used to compare items in the collection. Only the Compare method is used.