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


Indexed array of items in the collection.


Source position: classesh.inc line 567

public property TCollection.Items[Index: Integer] : TCollectionItem
  read GetItem
  write SetItem;


Items provides indexed access to the items in the collection. Since the array is zero-based, Index should be an integer between 0 and Count-1.

It is possible to set or retrieve an element in the array. When setting an element of the array, the object that is assigned should be compatible with the class of the objects in the collection, as given by the TCollection.ItemClass property.

Adding an element to the array can be done with the TCollection.Add method. The array can be cleared with the TCollection.Clear method. Removing an element of the array should be done by freeing that element.

See also



Number of items in the collection.



Class pointer for each item in the collection.



Removes all items from the collection.



Creates and adds a new item to the collection.

Documentation generated on: Jun 22 2020