Internet Direct (Indy) Version 9.0.1 Beta
TIdObjectList.IndexOf
Returns the index of the first object in the list with a specified value.

function IndexOf(AObject: TObject): Integer;
Parameters
AObject: TObject
Object instance to be located.

Returns
Integer - Index position of the located object instance.

Description
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.