Export (0) Print
Expand All

ArrayList.Reverse Method

Reverses the order of the elements in the entire ArrayList.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

abstract Reverse : unit -> unit  
override Reverse : unit -> unit

ExceptionCondition
NotSupportedException

The ArrayList is read-only.

This method uses Array.Reverse to reverse the order of the elements, such that the element at ArrayList [i], where i is any index within the range, moves to ArrayList [j], where j equals index + index + count - i - 1.

This method is an O(n) operation, where n is Count.

The following code example shows how to reverse the sort order of the values in an ArrayList.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft