InputScopeConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定義

判斷 InputScope 物件是否可從指定之型別的物件轉換。

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

參數

context
ITypeDescriptorContext

描述任何型別描述項內容的物件。 這個物件必須實作 ITypeDescriptorContext 介面。 此參數可以是 null

sourceType
Type

要檢查其轉換相容性的 Type

傳回

如果 sourceType 的型別為 String 則為 true,否則為 false

適用於