ArrayList.Sort Method ()
Sorts the elements in the entire ArrayList.
Assembly: mscorlib (in mscorlib.dll)
This method uses Array.Sort, which uses the QuickSort algorithm. The QuickSort algorithm is a comparison sort (also called an unstable sort), which means that a "less than or equal to" comparison operation determines which of two elements should occur first in the final sorted list. However, if two elements are equal, their original order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal. To perform a stable sort, you must implement a custom IComparer interface to use with the other overloads of this method.
On average, this method is an O(n log n) operation, where n is Count; in the worst case it is an O(n^2) operation.
Available since 10
Available since 1.1