IList.RemoveAt

Syntax

RemoveAt(Index: Integer);

Parameters

Index. Index of position of the element that should be removed.

Description

The RemoveAt method removes the element, which position index is passed by the input parameter.

Example

Sub UserProc;
Var
    ArrayL: IArrayList;
    i: Integer;
Begin
    ArrayL := 
New ArrayList.Create;
    
For i := 0 To Math.RandBetweenI(0100Do
        ArrayL.Add(Math.RandBetweenI(
050));

    
End For;
    ArrayL.RemoveAt(ArrayL.Count - 
1);
End Sub UserProc;

After executing the example a dynamic array with random values is created, and the last element is removed from it.

See also:

IList