IList.Remove

Syntax

Remove(Value: Variant);

Parameters

Value - value of element that should be removed.

Description

The Remove method removes the element, which value is passed by the Value parameter.

Example

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:

IList