ArrayList: Capacity (let)

Capacity

Sets the number of allocated elements in the array.



 Public Property Let Capacity(
	  ByVal RHS As Long )

Parameters

RHS
[ByVal] Long. The number of elements to set the array to.

Remarks

The capacity cannot be set less than the number of items in the list. If the capacity is set to zero, then it is set to the default capacity (16).

Exceptions

Exception TypeCondition
ArgumentExceptionThe Capacity was set to a value that is less than Count.

Read/Write.

See Also

Project VBCorLib Overview Class ArrayList Overview ArrayList Properties ArrayList Methods Capacity (get) Clear