語言

LinkConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

擷取一個值,判斷是否 LinkConverter 能將具有指定上下文的物件轉換成指定型別。

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

要將物件轉換成的類型。

傳回

true 若能 LinkConverter 轉換指定物件;否則, false。

適用於

另請參閱