IStringList.RemoveAt

Syntax

RemoveAt(Index: Integer);

Parameters

Index. Index of the element that should be removed.

Description

The Remove method removes the element with the specified index.

Example

Sub UserProc;
Var
    StrL: IStringList;
    i: Integer;
Begin
    StrL := New StringList.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        StrL.Add("Number " + Math.RandBetweenI(0100).ToString);
    End For;
    StrL.RemoveAt(StrL.Count - 1);
End Sub UserProc;

After executing the example a dynamic array of strings is generated, and the last element is removed from it.

See also:

IStringList