Share via


ToString Method

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

Converts the value of this instance to a String.

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

Syntax

'Declaration
Public Overrides Function ToString As String
public override string ToString()
public:
virtual String^ ToString() override
abstract ToString : unit -> string 
override ToString : unit -> string 
public override function ToString() : String

Return Value

Type: System. . :: . .String
A string whose value is the same as 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