Remove(Key: Variant);
Key. Key of the element that should be removed.
The Remove method removes element by the specified key.
Sub Main;
Var
Hast: IHashtable;
i: Integer;
Begin
Hast := New Hashtable.Create;
For i := 0 To 100 Do
Hast.Add(i, Math.RandBetween(0, 100));
End For;
Hast.Remove(Math.RandBetweenI(0, 100));
End Sub Main;
After executing the example a hash table is created that contains random numbers from 0 to 100, and the element with random key is removed.
See also: