TypeConverter.ConvertTo Method (Object, Type)

May 11, 2014

Converts the specified value object to the specified type.

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

public Object ConvertTo(
	Object value,
	Type destinationType
)

Parameters

value
Type: System.Object
The object to convert.
destinationType
Type: System.Type
The type to convert the object to.

Return Value

Type: System.Object
The converted object.

A call to this method forwards the call to ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type), with null passed for context, current culture for culture, and the destinationType of the original call.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft