Converts a substring of the current StringBuilder to a String.
[Visual Basic] Overloads Public Function ToString( _ ByVal startIndex As Integer, _ ByVal length As Integer _ ) As String [C#] public string ToString( int startIndex, int length ); [C++] public: String* ToString( int startIndex, int length ); [JScript] public function ToString( startIndex : int, length : int ) : String;
A new String representing the characters in the current StringBuilder beginning at startIndex and ending at startIndex + length- 1.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | if startIndex and length don't specify a valid range. |
StringBuilder Class | StringBuilder Members | System.Text Namespace | StringBuilder.ToString Overload List