Skip to content

TObjectList.FindInstanceOf

Search for an instance of a certain class.

Declaration

Source position: contnrs.pp line 96

public 
function TObjectList.FindInstanceOf(AClass: TClass; AExact: Boolean; 
                                   AStartAt: Integer) : Integer;

Description

FindInstanceOf will look through the instances in the list and will return the first instance which is a descendent of class AClass if AExact is False. If AExact is true, then the instance should be of class AClass.

If no instance of the requested class is found, Nil is returned.

Errors

None.

See also

Name Description
TObjectList.IndexOf Search for an object in the list.