Internet Direct (Indy)
Home
PreviousUpNext
TIdDBList.IndexOf Method

Determines the ordinal position (or index) of a specified collection item in the collection.

Pascal
function IndexOf(
    AItem: TIdDBInfo
): Integer;
Parameters 
Description 
AItem 
Collection item to locate in the container. 

>=0 - Ordinal position (0-based) of the collection item. -1 - Collection item does not exist in the container.

IndexOf is an Integer function used to determine the ordinal position (or index) of the collection item specified in AItem in the collection. 

The return value is the 0-based index of the collection item in the container, or -1 when the collection item does not exist in the container. 

Use Items to access (read/write) collection items using the index position of the item in the collection. 

Use Add to create a new collection item in the container.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.