[Overview][Types][Classes][Index] Reference for unit 'ObjectLists' (#lazutils)

TObjectArray.IndexOf

Gets the ordinal position in List where the specified TItem instance is stored.

Declaration

Source position: objectlists.pas line 73

public function TObjectArray.IndexOf(

  Item: TItem

):Integer;

Arguments

Item

  

TItem instance to locate in the List of associations.

Function result

Ordinal position for the requested TItem instance.

Description

IndexOf is an Integer function used to get the ordinal position in List where the TItem instance specified in Item is stored. IndexOf iterates over the storage in List in reverse order.

The return value contains the ordinal position where the T2Pointer.Item member and the Item argument contain the same class instance. The return value is -1 when Item is not located in the associations stored in List.

See also

TObjectArray.List

  

Provides access to the list which implements the storage for the item/object associations in the class instance.

T2Pointer

  

Record type with pointers to members in the association.


Version 4.0 Generated 2025-05-03 Home