UriTypeConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

返回此转换器能否使用指定上下文将对象转换为指定类型。Returns whether this converter can convert the object to the specified type, using the specified context.

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

destinationType
Type

一个 Type,表示要转换到的类型。A Type that represents the type that you want to convert to.

返回

如果 truedestinationTypeInstanceDescriptorString 类型,则为 Uri;否则为 falsetrue if destinationType is of type InstanceDescriptor, String, or Uri; otherwise, false.

适用于