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

TCollection.Items

Indexed array of items in the collection.

Declaration

Source position: classesh.inc line 412

public property TCollection.Items: TCollectionItem
  read GetItem
  write SetItem;

Description

Itemsprovides indexed access to the items in the collection. Since the array is zero-based, Indexshould be an integer between 0and 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.ItemClassproperty.

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

See also

TCollection.Count

  

Number of items in the collection.

TCollection.ItemClass

  

Class pointer for each item in the collection.

TCollection.Clear

  

Removes all items from the collection.

TCollection.Add

  

Creates and adds a new item to the collection.