Sign in Join
FPDoc Onlineexperiment

TCollection.FindItemID function

Member of TCollectionpublicIn unit Classes

Searches for an Item in the collection, based on its ID property.

Declaration

pascal
function FindItemID(ID: Integer): TCollectionItem

Description

FindItemID searches through the collection for the item that has a value of ID for its ID property, and returns the found item. If no such item is found in the collection, Nil is returned.

The routine performs a linear search, so this can be slow on very large collections.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.