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.

适用于