RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStrings.GetObject Method

Returns the object associated with the string at a specified index.

Pascal
function GetObject(Index: Integer): TObject; virtual;
C++
virtual __fastcall TObject * GetObject(int Index);

GetObject is the protected read implementation of the Objects property. 

Index is the index of the string with which the object is associated. 

In TStrings, GetObject always returns nil (Delphi) or NULL (C++). This provides a default implementation for descendants that do not support associating objects with the strings in the list. Descendants that support this feature override GetObject to return the specified object. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!