System.Classes.TStringList.IndexOfObject

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IndexOfObject(AObject: TObject): Integer; override;

C++

virtual int __fastcall IndexOfObject(System::TObject* AObject);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TStringList

Description

Returns the index of the first string in the list associated with a given object.

System.Classes.TStringList.IndexOfObject inherits from System.Classes.TStrings.IndexOfObject. All content below this line refers to System.Classes.TStrings.IndexOfObject.

Returns the index of the first string in the list associated with a given object.

Call IndexOfObject to locate the first string in the list associated with the object AObject. Specify the object you want to locate as the value of the AObject parameter. IndexOfObject returns the 0-based index of the string and object. If the object is not associated with any of the strings, IndexOfObject returns -1.

See Also