[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TCollectionItem.ID

Initial index of this item.

Declaration

Source position: classesh.inc line 364

public property TCollectionItem.ID: Integer
  read FID;

Description

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

While the TCollectionItem.Indexproperty forms a continuous series, IDdoes not. If items are removed from the collection, their IDis not used again, leaving gaps. Only when the collection is initialiiy created, the IDand Indexproperties will be equal.

See also

TCollection.Items

  

Indexed array of items in the collection.

TCollectionItem.Index

  

Index of the item in its managing collection TCollection.Itemsproperty.