IArrayList.RemoveRange

Syntax

RemoveRange(Index: Integer; Count: Integer);

Parameters

Index. Index of the element, starting from which the removed range starts.

Count. Number of elements in the removed range.

Description

The RemoveRange method removes range of the elements.

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.RemoveRange(ArrayL.Count - 1010);
End Sub UserProc;

After executing the example a dynamic array of random numbers is generated, and the last 10 elements are removed from it.

See also:

IArrayList