System.Contnrs.TObjectList.FindInstanceOf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FindInstanceOf(AClass: TClass; AExact: Boolean = True; AStartAt: Integer = 0): Integer;

C++

int __fastcall FindInstanceOf(System::TClass AClass, bool AExact = true, int AStartAt = 0x0);

Properties

Type Visibility Source Unit Parent
function public
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs TObjectList

Description

Finds the first instance of a specified class in the list.

FindInstanceOf returns the index of the first instance of AClass appearing after AStartAt in the Items array. If AExact is true, FindInstanceOf returns instances only of AClass itself, ignoring instances of descendent classes. If no instance of the specified class is found, FindInstanceOf returns –1.

See Also