Skip to content

TObjectList.Insert

Insert an object in the list.

Declaration

Source position: contnrs.pp line 97

public 
procedure TObjectList.Insert(Index: Integer; AObject: TObject);

Description

Insert inserts AObject in the list at position Index. The index is zero-based. This method overrides the implementation in TList to accept objects instead of pointers.

Errors

If an invalid Index is specified, an exception is raised.

See also

Name Description
TObjectList.Add Add an object to the list.
TObjectList.Remove Remove (and possibly free) an element from the list.