System.Text Namespace StringBuilder Class
Ensures that the capacity of this instance of StringBuilder is at least the specified value.
[ VB ] <Serializable> Public Function EnsureCapacity ( _ ByVal capacity As Integer _ ) As Integer [ C# ] [Serializable] public int EnsureCapacity ( int capacity ); [ C++ ] [Serializable] public: int EnsureCapacity ( int capacity ); [ JScript ] public Serializable function EnsureCapacity ( capacity : int ) : int;
The current capacity of this instance.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | capacity is less than zero. |
If the number of characters in this instance is less than or equal to the capacity parameter, memory for this instance is reallocated to hold at least capacity number of characters; otherwise, no memory is changed. In either case, the current value of the Capacity property is returned.
Check out related books at Amazon
© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note