System.Generics.Collections.TList.Add
Delphi
function Add(const Value: T): Integer; inline;
C++
int __fastcall Add(const T Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TList |
Description
Adds an item to the end of a list.
Add adds a given item to the end of the list. You can add nil. The capacity, Capacity, of the list is increased if necessary. This is an O(1) operation.
An OnNotify event occurs, indicating that an entry was added to the list.
Add returns the position of the new item in the TList.