NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Array.Reverse (Array, Int32, Int32)

Reverses the sequence of the elements in a section of the one-dimensional Array.

[Visual Basic]
Overloads Public Shared Sub Reverse( _
   ByVal array As Array, _
   ByVal index As Integer, _
   ByVal length As Integer _
)
[C#]
public static void Reverse(
   Array array,
   int index,
   int length
);
[C++]
public: static void Reverse(
   Array* array,
   int index,
   int length
);
[JScript]
public static function Reverse(
   array : Array,
   index : int,
   length : int
);

Parameters

array
The one-dimensional Array to reverse.
index
The starting index of the section to reverse.
length
The number of elements in the section to reverse.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).
RankException array is multidimensional.
ArgumentOutOfRangeException index is less than the lower bound of array.

-or-

length is less than zero.

ArgumentException index and length do not denote a valid range in array.

Remarks

After a call to this method, the element at Array [i], where i is any index within the range, moves to Array [j], where j equals index + index + count- i- 1.

See Also

Array Class | Array Members | System Namespace | Array.Reverse Overload List