ConvertFromString Method (String)
Collapse the table of content
Expand the table of content

TypeConverter.ConvertFromString Method (String)


Converts the specified text to an object.

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

public object ConvertFromString(
	string text


Type: System.String

The text representation of the object to convert.

Return Value

Type: System.Object

An Object that represents the converted text.

Exception Condition

The string cannot be converted into the appropriate object.

The default implementation always returns null.

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

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2016 Microsoft