Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Convert::ToString Method (Object^)

 

Converts the value of the specified object to its equivalent string representation.

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

public:
static String^ ToString(
	Object^ value
)

Parameters

value
Type: System::Object^

An object that supplies the value to convert, or null.

Return Value

Type: System::String^

The string representation of value, or String::Empty if value is null.

To convert value to its string representation, the method tries to call the IConvertible::ToString implementation of value. If value does not implement the IConvertible interface, the method tries to call the IFormattable::ToString implementation of value. If value does not implement the IFormattable interface, the method calls the ToString method of the underlying type of value.

The following example converts each element in an object array to its equivalent string representation.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft