LengthConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷是否能從特定類型轉換為代表物件長度的 。Double
public:
override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, Type ^ sourceType);
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (typeDescriptorContext As ITypeDescriptorContext, sourceType As Type) As Boolean
參數
- typeDescriptorContext
- ITypeDescriptorContext
提供元件的上下文資訊。
- sourceType
- Type
識別要評估以進行轉換的資料類型。
傳回
true若可轉換;否則,。 false
備註
LengthConverter支援與以下類型String之間的轉換:、、DecimalSingle、DoubleInt16Int32Int64UInt16UInt32UInt64及。