SubclassTypeValidator.CanValidate(Type) 方法

定义

根据类型确定对象是否可验证。Determines whether an object can be validated based on type.

public:
 override bool CanValidate(Type ^ type);
public override bool CanValidate (Type type);
override this.CanValidate : Type -> bool
Public Overrides Function CanValidate (type As Type) As Boolean

参数

type
Type

对象类型。The object type.

返回

Boolean

如果 type 参数与可验证类型匹配,则为 true;否则为 falsetrue if the type parameter matches a type that can be validated; otherwise, false.

注解

CanValidate方法确定要验证的对象的类型是否为事实上的 TypeThe CanValidate method determines whether the type of the object being validated is in fact a Type.

适用于