ColumnHeaderConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

返回一个值,该值指示是否可以 ColumnHeaderConverter 使用指定的上下文将 a ColumnHeader 转换为指定类型。

public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ destinationType);
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, Type destinationType);
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, Type? destinationType);
override this.CanConvertTo : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertTo (context As ITypeDescriptorContext, destinationType As Type) As Boolean

参数

context
ITypeDescriptorContext

提供格式上下文的 A ITypeDescriptorContext

destinationType
Type

表示要转换为的类型的类型。

返回

true 如果此转换器可以执行转换,则为否则,为 false.

注解

使用上下文参数提取有关从中调用此转换器的环境的其他信息。 此参数可以是 null,因此请始终检查它。 此外,上下文对象的属性也可以返回 null

适用于