BaseNumberConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

返回指示该转换器能否使用上下文将对象转换为给定目标类型的值。

public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ destinationType);
public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ t);
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 t);
override this.CanConvertTo : System.ComponentModel.ITypeDescriptorContext * Type -> bool
override this.CanConvertTo : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertTo (context As ITypeDescriptorContext, destinationType As Type) As Boolean
Public Overrides Function CanConvertTo (context As ITypeDescriptorContext, t As Type) As Boolean

参数

context
ITypeDescriptorContext

一个 ITypeDescriptorContext,用于提供格式上下文。

destinationTypet
Type

表示要转换为的类型的Type

返回

如果此转换器能够执行该操作,则为 true;否则为 false

适用于