RegexStringValidator.CanValidate(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

物件的類型。

傳回

true 若參數 type 與字串相符;否則, false

備註

如果驗證失敗,則會拋出例外。

適用於