ArrayList: Sort

Sort

Sorts the items in the list.



 Public Sub Sort(
	  Optional ByRef StartIndex As Variant,
	  Optional ByRef Count As Variant,
	  Optional ByVal Comparer As IComparer )

Parameters

StartIndex
[ByRef] Optional. Variant. The index to start sorting the items.
Count
[ByRef] Optional. Variant. The number of items to include in the sort.
Comparer
[ByVal] Optional. IComparer. A custom comparer used to compare items in the list.

Remarks

The list is sorted in ascending order by default. By providing a custom comaprer, the list can be sorted in special ways, such as descending order.

See Also

Class ArrayList Overview ArrayList Properties ArrayList Methods SetRange ToArray