Inserts a string into the list at the specified position, and associates it with an object and an item.
Call InsertObject to insert the string S into the list at the position identified by Index, and associate it with the object AObject and item AData. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on.
Note |
---|
If OwnsObjects is false, the stringlist object does not own the objects you add this way. Objects added to the TStringList<T> object still exist even if the TStrings instance is destroyed. They must be explicitly destroyed by the application. |
Namespace: RSGenerics.Collections
Delphi |
public |
Parameters
Index
Type: Integer
S
Type: string
AObject
Type: TObject
AData
Type: T
Reference•RSGenerics.Collections.TStringList<T>.Data[Integer] •RSGenerics.Collections|TStringList<T>.AddObject(Integer,string,TObject,T) |