BaseNumberConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

返回指示该转换器能否使用上下文将对象转换为给定目标类型的值。Returns a value indicating whether this converter can convert an object to the given destination type using the context.

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 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,用于提供格式上下文。An ITypeDescriptorContext that provides a format context.

destinationTypet
Type

表示要转换为的类型的TypeA Type that represents the type to which you want to convert.

返回

Boolean

如果此转换器能够执行该操作,则为 true;否则为 falsetrue if this converter can perform the operation; otherwise, false.

适用于