Algorithms..::..SortInPlace<(Of <(<'T>)>)> Method (IList<(Of <(<'T>)>)>)
Sorts a list or array in place.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
public static void SortInPlace<T>( IList<T> list ) 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 Sub SortInPlace(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)}) ( _ list As IList(Of 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 void SortInPlace( IList<T>^ list )
Type Parameters
- T
Parameters
- list
- Type: IList<(Of <(<'T>)>)>
The list or array to sort.
Remarks
The 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.
Values are compared by using the IComparable<T> interfaces implementation on the type T.
Although arrays cast to IList<T> are normally read-only, this method will work correctly and modify an array passed as list.