IArrayList.ReverseRange

Syntax

ReverseRange(Index: Integer; Count: Integer);

Parameters

Index. Index of the element, from which a range starts.

Count. Number of range elements.

Description

The ReverseRange method sets reverse order of array element range.

Example

Sub UserProc;
Var
    ArrayL: IArrayList;
    i: Integer;
Begin
    ArrayL := New ArrayList.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        ArrayL.Add(Math.RandBetweenI(0100));
    End For;
    ArrayL.ReverseRange(Double.FloorInt(ArrayL.Count / 2), Double.FloorInt(ArrayL.Count / 2) + 1);
End Sub UserProc;

After executing the example a dynamic array of strings is generated, the second part of the array is reversed.

See also:

IArrayList