語言

LengthConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

判斷是否可從代表物件長度的 轉換為 Double 指定型別。

public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, Type ^ destinationType);
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, Type destinationType);
override this.CanConvertTo : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertTo (typeDescriptorContext As ITypeDescriptorContext, destinationType As Type) As Boolean

參數

typeDescriptorContext
ITypeDescriptorContext

提供元件的上下文資訊。

destinationType
Type

識別要評估以進行轉換的資料類型。

傳回

true如果可以轉換成 ,destinationType否則 。 false

備註

LengthConverter支援以下類型的轉換:String、、Decimal、SingleDoubleInt16Int32Int64UInt16UInt32UInt64及。

適用於