Click or drag to resize
ArrayListSort Method (IComparer)
Sorts the elements in the entire ArrayList using the specified comparer.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual void Sort(
	IComparer comparer
)

Parameters

comparer
Type: System.CollectionsIComparer
The IComparer implementation to use when comparing elements.-or- A null reference (Nothing in Visual Basic) to use the IComparable implementation of each element.
Exceptions
ExceptionCondition
NotSupportedExceptionThe ArrayList is read-only.
InvalidOperationExceptionAn error occurred while comparing two elements.
See Also