RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseArray.Capacity Property

Specifies the maximum number of items that can be added to the array.

Pascal
property Capacity: Integer;
C++
__property int Capacity;

Set Capacity to change the amount of memory allocated for the array. Trying to set Capacity to a value less than the Count property will raise an EArrayError exception. 

If the AutoSize property is true, the Capacity of the array increases automatically when necessary to accommodate new items as they are added.

Note: To determine the amount of memory used by the array, use Capacity * ItemSize.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!