RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseArray.Count Property

Specifies the number of items in the array.

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

Read Count to determine the number of entries in the array. Set Count to increase or decrease the number of entries. Increasing Count always increases the Capacity if necessary, even if the AutoSize property is false. Decreasing the Count property truncates the array after Count items, but does not affect the Capacity of the array. 

When the value of Count is increased, new entries with the value of 0 are added to the end of the array. If the array is sorted, this will throw off the internal sort order, and cause the FindItem method to fail. If the array is sorted, call the Sort method to restore the sort order after filling the newly added members of the array. 

 

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