GenericExtensionsSortStableT Method (IListT, ComparisonT) |
Sorts the elements in the entire List{T} using the provided comparer.
A merge sort algorithm is used. merge sort is a stable sort algorithm
i.e. if two elements are equal their order are preserved.
Namespace:
DHI.Mike1D.Generic
Assembly:
DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax public static void SortStable<T>(
this IList<T> list,
Comparison<T> comparer
)
<ExtensionAttribute>
Public Shared Sub SortStable(Of T) (
list As IList(Of T),
comparer As Comparison(Of T)
)
public:
[ExtensionAttribute]
generic<typename T>
static void SortStable(
IList<T>^ list,
Comparison<T>^ comparer
)
Parameters
- list
- Type: System.Collections.GenericIListT
List to sort - comparer
- Type: SystemComparisonT
Comparer to use while sorting
Type Parameters
- T
- Type of elements to sort
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also