XPathMessageContextTypeConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法
定义
测试是否可将上下文从一个类型转换为此转换器的类型。Tests whether a context can be converted from one type to the type of this converter.
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
一个提供格式上下文的类型。A type that provides the format context.
- sourceType
- Type
要转换的类型。The type to convert from.
返回
如果可以转换类型,则为 true;否则为 false。true if the type can be converted; otherwise, false.