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

Exception Condition
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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: