EventSetterHandlerConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) 方法

定义

将指定的值对象转换为指定的类型。Converts the specified value object to the specified type. 将始终引发异常。Always throws an exception.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, value As Object, destinationType As Type) As Object

参数

typeDescriptorContext
ITypeDescriptorContext

一个 ITypeDescriptorContext,用于提供格式上下文。An ITypeDescriptorContext that provides a format context.

cultureInfo
CultureInfo

要用作当前区域性的 CultureInfoThe CultureInfo to use as the current culture.

value
Object

要转换的值。The value to convert.

destinationType
Type

value 参数所要转换成的类型。The type to convert the value parameter to.

返回

将始终引发异常。Always throws an exception.

例外

在所有情况下均引发。Thrown in all cases.

适用于