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