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