SortingExtensionMethodsSortT Method (IListT, SortAlgorithm, SortDirection, Int32, Int32, IComparerT) |
Sorts the specified IList(Of T) using the algorithm specified in the order specified.
Namespace: SD.Tools.Algorithmia.SortingAssembly: SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.2.0.0 (1.2.14.1118)
Syntax public static void Sort<T>(
this IList<T> toSort,
SortAlgorithm algorithm,
SortDirection direction,
int startIndex,
int endIndex,
IComparer<T> comparer
)
<ExtensionAttribute>
Public Shared Sub Sort(Of T) (
toSort As IList(Of T),
algorithm As SortAlgorithm,
direction As SortDirection,
startIndex As Integer,
endIndex As Integer,
comparer As IComparer(Of T)
)
Parameters
- toSort
- Type: System.Collections.GenericIListT
the list to sort. - algorithm
- Type: SD.Tools.AlgorithmiaSortAlgorithm
The algorithm to use. - direction
- Type: SD.Tools.AlgorithmiaSortDirection
The direction to sort the elements in. - startIndex
- Type: SystemInt32
The start index. - endIndex
- Type: SystemInt32
The end index. - comparer
- Type: System.Collections.GenericIComparerT
The comparer to use. If set to null, the default comparer for T is used.
Type Parameters
- T
- type of the elements in toSort
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