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 Main;

Var

ArrayL: IArrayList;

i: Integer;

Begin

ArrayL:=New ArrayList.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

ArrayL.Add(Math.RandBetweenI(0,100));

End For;

ArrayL.RemoveRange(ArrayL.Count-10,10);

End Sub Main;

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

See also:

IArrayList