June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Class StringBuilder provides the Length and Capacity properties to return the number of characters currently in a StringBuilder and the number of characters that a StringBuilder can store without allocating more memory, respectively. These properties also can increase or decrease the length or the capacity of the StringBuilder.
Method EnsureCapacity allows you to reduce the number of times a StringBuilder’s capacity must be increased. Method EnsureCapacity doubles the StringBuilder instance’s current capacity. If this doubled value is greater than the value you wish to ensure, that value becomes the new capacity. Otherwise, EnsureCapacity alters the ...
Read now
Unlock full access