BaseIListConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定義

判斷是否可轉換指定的型別。Determines if a given type can be converted.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ td, Type ^ t);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext td, Type t);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (td As ITypeDescriptorContext, t As Type) As Boolean

參數

td
ITypeDescriptorContext

提供轉換所需的內容資訊。Provides contextual information required for conversion.

t
Type

正在評估以進行轉換的型別。Type being evaluated for conversion.

傳回

Boolean

如果這個型別是可轉換的則為 true,否則為 falsetrue if this type can be converted; otherwise, false.

備註

String 是唯一支援的轉換類型。String is the only supported type for conversion.

適用於