System.Contnrs.TObjectList.Add
Delphi
function Add(AObject: TObject): NativeInt; inline;
C++
HIDESBASE System::NativeInt __fastcall Add(System::TObject* AObject);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TObjectList |
Description
Inserts an object at the end of the list.
Call Add to insert an object at the end of the list. Add places the object after the last item, even if the array contains nil (Delphi) or NULL (C++) references, and returns the index of the inserted object. (The first object in the list has an index of 0.)
Add increments Count and, if necessary, allocates memory by increasing the value of Capacity.