|
|
|
|
Capacity Property, ItemCollectionClass Class |
Defines the number of items that the ItemCollectionClass instance can contain.
Syntax ItemCollectionClass Class (Softelvdm.SftTreeNET)
VB |
Public Property Capacity As Integer |
C# |
public int Capacity { get; set; } |
C++ |
public: property int Capacity { |
Property Value
The number of items.
Comments
The Capacity property defines the number of items that the ItemCollectionClass instance can contain.
Capacity is the number of items that the ItemCollectionClass instance can store. CollectionBase.Count is the number of elements that are actually in the ItemCollectionClass instance.
Capacity is always greater than or equal to Count. If Count exceeds Capacity while adding elements, the capacity is automatically increased by reallocating the internal array before copying the old items and adding the new items.
The capacity can be decreased by setting the Capacity property explicitly. When the value of Capacity is set explicitly, the internal array is also reallocated to accommodate the specified capacity.