System.Classes.TCollectionItem.Index

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Index: Integer read GetIndex write SetIndex;

C++

__property int Index = {read=GetIndex, write=SetIndex, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.Classes.pas
System.Classes.hpp
System.Classes TCollectionItem

Description

Returns the item's position in the Items array of TCollection.

Each TCollectionItem is indexed in the Items array of the TCollection to which it belongs. The Index property of the TCollectionItem contains the item's index value in that array. Read the value of Index to determine the collection item's position. Set the value of Index to move the collection item to a new position.

Items is a zero-based array. The first member of the collection has an index value of 0, the second member has an index value of 1, and so forth.

See Also

Code Examples