Skip to main content
TypeConverterConvertToString Method
 

Converts the specified value to a string representation.

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

Syntax
public string ConvertToString(
	object value
)
public:
String^ ConvertToString(
	Object^ value
)
member ConvertToString : 
        value:Object -> string
Public Function ConvertToString (
	value As Object
) As String

Parameters

value
Type:

The Object to convert.

Return Value

Type:

An Object that represents the converted value.

Exceptions
Exception Condition
NotSupportedException

The conversion cannot be performed.

Remarks

Depending on the implementation of the value formatter, it might be possible to pass the returned string back into the value formatter to re-create an instance of the object.

Examples

For an example on this function, see the TypeConverter class.

Version Information
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top