ConvertFromString Method (String)

TypeConverter.ConvertFromString Method (String)

 

Converts the specified text to an object.

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

public object ConvertFromString(
	string text
)

Parameters

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
NotSupportedException

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
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft