public int Capacity { get; set; }Public Property Capacity As Integer
Get
Setpublic:
virtual property int Capacity {
int get () sealed;
void set (int value) sealed;
}abstract Capacity : int with get, set
override Capacity : int with get, setIf new value is smaller than elements count, then cost of setting this property is O(n), where n is the difference of Count before setting the property and the new capacity to set.
If new value is larger than elements count, and EnsureCapacity returns , then cost of setting this property is O(n), where n is the new capacity.
Otherwise, the cost of setting this property is O(1).