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

定义

使用这些参数将给定值对象转换为 Unicode 字符对象。Converts the given value object to a Unicode character object using the arguments.

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

参数

context
ITypeDescriptorContext

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

culture
CultureInfo

value 将要转换到的区域性。The culture into which value will be converted.

value
Object

要转换的 ObjectThe Object to convert.

destinationType
Type

要将值转换成的 TypeThe Type to convert the value to.

返回

一个 Object,它表示转换后的值。An Object that represents the converted value.

例外

无法执行转换。The conversion cannot be performed.

适用于