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

定义

使用指定的上下文和区域性信息将指定的对象转换为指定的类型。Converts the specified object to the specified type, using the specified context and culture information.

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

CultureInfo,表示区域性的信息,如语言和日历系统。A CultureInfo that represents information about a culture, such as language and calendar system. 可以为 nullCan be null.

value
Object

要转换的 ObjectThe Object to convert.

destinationType
Type

转换的目标 TypeThe Type to convert to.

返回

Object,转换的结果。The Object that is the result of the conversion.

异常

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

适用于