Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Capacity Property, CellCollectionClass Class

Defines the number of cells that the CellCollectionClass instance can contain.

Class: CellCollectionClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

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

Value

The number of cells.

Comments

Defines the number of cells that the CellCollectionClass instance can contain.

Capacity is the number of cells that the CellCollectionClass instance can store. CellCollectionClass.Count is the number of elements that are actually in the CellCollectionClass instance.

Capacity is always greater than or equal to CellCollectionClass.Count. If CellCollectionClass.Count exceeds Capacity while adding elements, the capacity is automatically increased by reallocating the internal array before copying the old cells and adding the new cells.

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 CellCollectionClass Class | Classes | SftTree/NET 2.0