Remove(Value: Variant);
Value - value of element that should be removed.
The Remove method removes the element, which value is passed by the Value parameter.
Sub Main;
Var
ArrayL: IArrayList;
List: IList;
i: Integer;
Begin
ArrayL:=New ArrayList.Create;
List:=ArrayL As IList;
For i:=0 To Math.RandBetweenI(0,100) Do
List.Add(Math.RandBetweenI(0,50));
End For;
List.Remove(50);
End Sub Main;
After executing the example a dynamic array with random values is created, and the element with the 50 value is deleted if it exists.
See also: