Skip to content

TObjectList.Add

Add an object to the list.

Declaration

Source position: contnrs.pp line 92

public 
function TObjectList.Add(AObject: TObject) : Integer;

Description

Add overrides the TList implementation to accept objects (AObject) instead of pointers.

The function returns the index of the position where the object was added.

Errors

If the list must be expanded, and not enough memory is available, an exception may be raised.

See also

Name Description
TObjectList.Insert Insert an object in the list.
#rtl.classes.TList.Delete
TObjectList.Extract Extract an object from the list.
TObjectList.Remove Remove (and possibly free) an element from the list.