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

識別資料型別,以評估轉換。

傳回

Boolean

如果可轉換為 destinationType,則為 true,否則為 false

備註

LengthConverter支援下列類型的轉換: StringDecimalSingle DoubleInt16 、、 Int32 UInt16 Int64 UInt32 、 和 。 UInt64

適用於