ISortedList.RemoveAt

Syntax

RemoveAt(Index: Integer);

Parameters

Index. Index of the element that should be removed.

Description

The RemoveAt method removes the element with the specified index.

Example

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

After executing the example the last element of the array is removed.

See also:

ISortedList