[This is preliminary documentation and is subject to change.]

Converts the given value object to the specified type, using the specified context and culture information.

Namespace: Tools.ComponentModelT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public override sealed Object ConvertTo(
	ITypeDescriptorContext context,
	CultureInfo culture,
	Object value,
	Type destinationType
)
Visual Basic
Public Overrides NotOverridable Function ConvertTo ( _
	context As ITypeDescriptorContext, _
	culture As CultureInfo, _
	value As Object, _
	destinationType As Type _
) As Object
Visual C++
public:
virtual Object^ ConvertTo(
	ITypeDescriptorContext^ context, 
	CultureInfo^ culture, 
	Object^ value, 
	Type^ destinationType
) override sealed
F#
abstract ConvertTo : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object * 
        destinationType:Type -> Object 
override ConvertTo : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object * 
        destinationType:Type -> Object 
JScript
public override final function ConvertTo(
	context : ITypeDescriptorContext, 
	culture : CultureInfo, 
	value : Object, 
	destinationType : Type
) : Object

Parameters

context
Type: System.ComponentModel..::..ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
culture
Type: System.Globalization..::..CultureInfo
A CultureInfo. If null is passed, the current culture is assumed.
value
Type: System..::..Object
The Object to convert.
destinationType
Type: System..::..Type
The Type to convert the value parameter to.

Return Value

An Object that represents the converted value.

Remarks

Exceptions

ExceptionCondition
System..::..NotSupportedExceptionThe conversion cannot be performed.
System..::..ArgumentNullExceptionThe destinationType parameter is null

See Also