Mono Class Library: System.Text.StringBuilder Overview | Members

System.Text.StringBuilder Constructor

Constructs and initializes a new, empty instance of the System.Text.StringBuilder class, with a specified StringBuilder.Capacity . [Edit]

public StringBuilder (int capacity)

Parameters

capacity
A int containing the starting number of characters allowed in the System.Text.StringBuilder . [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptioncapacity is less than zero. [Edit]

Remarks

If the specified capacity is less than the default capacity, the StringBuilder.Capacity of the new instance of System.Text.StringBuilder is set to the default value. The System.Text.StringBuilder will dynamically allocate more space when it is required.

The new System.Text.StringBuilder is initialized to represent an empty string.

Note: The default value of the StringBuilder.Capacity property is implementation dependent.

[Edit]

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0