Share via


PropertyPathConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定義

傳回值,指出這個轉換子是否能將某一型別的物件轉換成 PropertyPath 型別。

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

提供格式內容的 ITypeDescriptorContext

sourceType
Type

Type,表示您要轉換的來源類型。

傳回

Boolean

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

適用於