語言

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

適用於

另請參閱