Data.DBXPlatform.TDBXStringList.AddObject

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source: System.Classes.pas
Unit: Data.DBXPlatform
Parent: TDBXStringList

Delphi

function AddObject(const S: string; AObject: TObject): Integer; override;

Description

Adds a string to the list, and associates an object with the string.

Data.DBXPlatform.TDBXStringList.AddObject inherits from System.Classes.TStrings.AddObject. All content below this line refers to System.Classes.TStrings.AddObject.

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.

See Also

Code Examples