UnitConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

返回一个值,该值指示转换器是否可以将 Unit 对象转换为指定类型。

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

指示要转换的对象上下文的一个 ITypeDescriptorContext 值。

destinationType
Type

表示 Type 要转换为的数据类型。

返回

true 如果转换器支持将 Unit 对象转换为目标类型,则为 ;否则为 false

适用于

另请参阅