TSubstringList.Objects Property

property Objects[const Index: Integer]: TObject read GetObject write PutObject;

The object of item Index.

#NameDescription
1Index

The item's index, 0..Count - 1.

Returns: TObject

Examples

An item's object, read and written.

uses Substr;

procedure Example;
var List: TSubstringList;
begin
    List := TSubstringList.Create(2);
    try
        List.AddObject('a', List);
        Assert(List.Objects[0] = List);
        List.Objects[0] := nil;
        Assert(List.Objects[0] = nil);
    finally
        List.Free;
    end;
end;
See Also: TSubstringList.AddObject, TSubstringList.IndexOfObject, TSubstringList.OwnsObjects