BuiltInRoleConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

获取一个值,该值指示此转换器能否使用上下文将对象转换为给定的目标类型。

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 对象,表示要转换为的类型。

返回

一个 Boolean 对象,指示此转换器是否能执行转换。

注解

context 参数可用于提取有关从中调用该转换器的环境的附加信息。 此参数可能为 Nothing,因此总是需要检查。 同样,上下文对象的属性可以返回 Nothing

此类型转换器支持 Visual Basic User 对象。

适用于

另请参阅