NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StringBuilder.Length

Retrieves or assigns the length of the current StringBuilder.

[Visual Basic]
Public Property Length As Integer
[C#]
public int Length {get; set;}
[C++]
public: __property int get_Length();
public: __property void set_Length(int);
[JScript]
public function get Length() : int;
public function set Length(int);

Property Value

The length of the current instance.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException The specified length for set is less than 0.
ArgumentOutOfRangeException The specified length for set is greater than MaxCapacity.

Remarks

If the length specified is less than the current instance, the StringBuilder is truncated. If the length is set to a value greater than the current length, the capacity is adjusted to be the same as the specified length. However, the length specified cannot be greater than MaxCapacity.

See Also

StringBuilder Class | StringBuilder Members | System.Text Namespace