Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Capacity Property, ItemCollectionClass Class

Defines the number of items that the ItemCollectionClass instance can contain.

Class: ItemCollectionClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public int Capacity { get; set; }
Public Property Capacity As Integer

Value

The number of items.

Comments

Defines the number of items that the ItemCollectionClass instance can contain.

Capacity is the number of items that the ItemCollectionClass instance can store. 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.

See Also ItemCollectionClass Class | Classes | SftTree/NET 2.0