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

System.Text.StringBuilder.Length Property

Gets or sets the length of the current instance. [Edit]

public int Length { set; get; }

Value

A int containing the length of the current instance. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe value specified for a set operation is less than 0. [Edit]

Remarks

If the specified length is less than the current length, the System.Text.StringBuilder is truncated to the specified length. If the specified length is greater than the current length, the end of the string value of the System.Text.StringBuilder is padded with spaces.

If the specified length is greater than the current StringBuilder.Capacity , StringBuilder.Capacity is set to the specified length.

Note: A space in Unicode format is defined as the hexadecimal value 0x20.

[Edit]

Requirements

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