StringBuilder.ToString Method (Int32, Int32)

May 11, 2014

Converts the value of a substring of this instance to a String.

Namespace:  System.Text
Assembly:  mscorlib (in mscorlib.dll)

public string ToString(
	int startIndex,
	int length
)

Parameters

startIndex
Type: System.Int32
The starting position of the substring in this instance.
length
Type: System.Int32
The length of the substring.

Return Value

Type: System.String
A string whose value is the same as the specified substring of this instance.

ExceptionCondition
ArgumentOutOfRangeException

startIndex or length is less than zero.

-or-

The sum of startIndex and length is greater than the length of the current instance.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft