Mono Class Library: System.Collections.ArrayList Overview | Members

System.Collections.ArrayList.Reverse Method

Reverses the sequence of the elements in the specified range of the current instance.

public virtual void Reverse (int index, int count)

Parameters

index
A int that specifies the zero-based index in the current instance at which reversing starts. This value is between 0 and the ArrayList.Count of the current instance minus count , inclusive.
count
A int that specifies the number of elements to reverse. This value is between 0 and the ArrayList.Count of the current instance minus index , inclusive.

Exceptions

TypeReason
ArgumentOutOfRangeException

index < 0.

-or-

count < 0.

ArgumentExceptionArrayList.Count of the current instance - index < count.
NotSupportedExceptionThe current instance is read-only.

Remarks

Operation
As described above.

This method uses Array.Reverse(Array) to modify the ordering of the current instance.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0