TypeConverterConvertFromString Method
 

Converts the specified text to an object.

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

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

Parameters

text
Type:

The text representation of the object to convert.

Return Value

Type:

An Object that represents the converted text.

Exceptions
Exception Condition
NotSupportedException

The string cannot be converted into the appropriate object.

Remarks

The default implementation always returns null.

Examples

For an example of 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