Sorts the elements in the entire ArrayList using the specified comparer.
[Visual Basic] Overloads Overridable Public Sub Sort( _ ByVal comparer As IComparer _ ) [C#] public virtual void Sort( IComparer comparer ); [C++] public: virtual void Sort( IComparer* comparer ); [JScript] public function Sort( comparer : IComparer );
-or-
a null reference (in Visual Basic Nothing) to use the IComparable implementation of each element.
None.
Exception Type | Condition |
---|---|
NotSupportedException | The ArrayList is read-only. |
This method can be overridden by a derived class.
ArrayList Class | ArrayList Members | System.Collections Namespace | ArrayList.Sort Overload List