System.Contnrs.TObjectList.IndexOf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IndexOf(AObject: TObject): Integer; inline;

C++

HIDESBASE int __fastcall IndexOf(System::TObject* AObject);

Properties

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

Description

Returns the index of the first object in the list with a specified value.

Call IndexOf to get the index for a specified object in the list, where the first object has index 0, the second object has index 1, and so on. If an object is not in the list, IndexOf returns -1. If an object appears more than once, IndexOf returns the index of the first appearance.

See Also