Reverses the order of the elements in the specified range.
[Visual Basic] Overloads Overridable Public Sub Reverse( _ ByVal index As Integer, _ ByVal count As Integer _ ) [C#] public virtual void Reverse( int index, int count ); [C++] public: virtual void Reverse( int index, int count ); [JScript] public function Reverse( index : int, count : int );
None.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | index is less than zero.
-or- count is less than zero. |
ArgumentException | index and count do not denote a valid range of elements in the ArrayList. |
NotSupportedException | The ArrayList is read-only. |
This method can be overridden by a derived class.
This method uses 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.
ArrayList Class | ArrayList Members | System.Collections Namespace | ArrayList.Reverse Overload List