public int Capacity { get; set; }
Public Property Capacity As Integer
Get
Set
public:
virtual property int Capacity {
int get () sealed;
void set (int value) sealed;
}
abstract Capacity : int with get, set
override Capacity : int with get, set
If 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).