Data.DBXPlatform.TDBXStringList.AddObject
Delphi
function AddObject(const S: string; AObject: TObject): Integer; override;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | System.Classes.pas | Data.DBXPlatform | TDBXStringList |
Description
Adds a string to the list, and associates an object with the string. {{#multireplace:Data.DBXPlatform.TDBXStringList.AddObject|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.Classes.TStrings.AddObject|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.Classes.TStrings.AddObject|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
Adds a string to the list, and associates an object with the string.
Call AddObject to add a string and its associated object to the list. AddObject returns the index of the new string and object.
Note: The TStrings object does not own the objects you add this way. Objects added to the TStrings object still exist even if the TStrings instance is destroyed. They must be explicitly destroyed by the application.