Sign in Join
FPDoc Onlineexperiment

TCollectionItem.ID property

Member of TCollectionItempublicIn unit Classes

Initial index of this item.

Declaration

pascal
property ID: Integer read FID;

Description

ID is the initial value of Index; it doesn't change after the index changes. It can be used to uniquely identify the item. The ID property doesn't change as items are added and removed from the collection.

While the Index property forms a continuous series, ID does not. If items are removed from the collection, their ID is not used again, leaving gaps. Only when the collection is initially created, the ID and Index properties will be equal.

See also

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