Collection.Remove

From Xojo Documentation

Method

Collection.Remove(Index as Integer)

Supported for all project types and targets.

Removes the specified element of a collection. Index is 1-based.

Sample Code

This code removes the first element.

Var c As New Collection
.
.
c.Remove(1)


Method

Collection.Remove(Key as String)

Supported for all project types and targets.

Removes the element of a collection specified by the value of its Key.

Sample Code

If you want to use the Item or Remove methods to refer to an item, use parentheses around the parameter passed to the method. This is because the compiler doesn't know which data type you are passing. For example, use

c.Remove("Name")

rather than

c.Remove "Name"