AlgorithmsSortInPlaceT Method (IListT, ComparisonT) |
Sorts a list or array in place. A supplied Comparison<T> delegate is used
to compare the items in the list.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static void SortInPlace<T>(
IList<T> list,
Comparison<T> comparison
)
public:
generic<typename T>
static void SortInPlace(
IList<T>^ list,
Comparison<T>^ comparison
)
Parameters
- list
- Type: System.Collections.GenericIListT
The list or array 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.SortInPlace``1(System.Collections.Generic.IList{``0},System.Comparison{``0})"]
RemarksThe Quicksort algorithms is used to sort the items. In virtually all cases,
this takes time O(N log N), where N is the number of items in the list.
Although arrays cast to IList<T> are normally read-only, this method
will work correctly and modify an array passed as list.
See Also