語言

UriTypeConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

傳回這個轉換子是否可以使用指定的內容,將 對象轉換成指定的型別。

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 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 A 代表你想轉換成的類型。

傳回

true若 destinationType 為類型 InstanceDescriptor、 String或 Uri;否則 。 false

適用於