ServiceXNameTypeConverter.CanConvertFrom(ITypeDescriptorContext, Type) ServiceXNameTypeConverter.CanConvertFrom(ITypeDescriptorContext, Type) ServiceXNameTypeConverter.CanConvertFrom(ITypeDescriptorContext, Type) ServiceXNameTypeConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

定義

取得值,這個值會指出此轉換子是否能將某個型別的物件轉換成 XNameGets a value that indicates whether this converter can convert an object of one type to an XName.

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 ITypeDescriptorContext ITypeDescriptorContext

型別描述項內容。The type descriptor context

sourceType
Type Type Type Type

要轉換的來源型別。The type to convert from.

傳回

如果這個轉換器可以執行轉換,則為 true,否則為 falsetrue if the converter can perform the conversion; otherwise, false.

適用於