IArrayList.Capacity

Syntax

Capacity: Integer;

Description

The Capacity property determines the number of elements that can be contained in the array.

Comments

The Capacity property is a the number of elements that can be contained in the array. The Count property is the number of elements that is actually contained in the array. Value of the Capacity property is always greater or equal to the value of the Count property. If on adding elements, the Count property exceeds value of the Capacity property, array size is doubled automatically.

Array capacity may be decreased by calling the TrimToSize method, or on explicit setting of the Capacity property.

See also:

IArrayList