Unit 'Contnrs' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPObjectList.IndexOf

Search for an object in the list.

Declaration

Source position: contnrs.pp line 54

public function TFPObjectList.IndexOf(

  AObject: TObject

):Integer;

Arguments

AObject

  

Object instance to search for.

Function result

Index of the object in the list, -1 if not present.

Description

IndexOf searches for the presence of AObject in the list, and returns the location (index) in the list. The index is 0-based, and -1 is returned if AObject was not found in the list.

Errors

None.

See also

TFPObjectList.Items

  

Indexed access to the elements of the list.

TFPObjectList.Remove

  

Remove an item from the list.

TFPObjectList.Extract

  

Extract an object from the list.


Documentation generated on: Jul 24 2023