Share via


ToString Method (Int32, Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Function ToString ( _
    startIndex As Integer, _
    length As Integer _
) As String
public string ToString(
    int startIndex,
    int length
)
public:
String^ ToString(
    int startIndex, 
    int length
)
member ToString : 
        startIndex:int * 
        length:int -> string 
public function ToString(
    startIndex : int, 
    length : int
) : String

Parameters

Return Value

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

Remarks

You must call the ToString method to convert the StringBuilder object to a String object before you can pass the string represented by the StringBuilder object to a method that has a String parameter or display it in the user interface.

.NET Framework Security

See Also

Reference

StringBuilder Class

ToString Overload

System.Text Namespace