ToString Method
Collapse the table of content
Expand the table of content

StringBuilder.ToString Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Converts the value of this instance to a String.

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

Public Overrides Function ToString As String

Return Value

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

The following code example demonstrates calling the ToString method. This code example is part of a larger example provided for the StringBuilder class.

' Display the number of characters in the StringBuilder and its string.
outputBlock.Text += String.Format("{0} chars: {1}", sb.Length, sb.ToString()) & vbCrLf

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft