System.Configuration.RegexStringValidator.CanValidate C# (CSharp) Метод

CanValidate() публичный Метод

public CanValidate ( Type type ) : bool
type System.Type
Результат bool
        public override bool CanValidate(Type type) {
            return (type == typeof(string));
        }

Usage Example

Пример #1
0
		public void CanValidate ()
		{
			RegexStringValidator v = new RegexStringValidator ("[0-9]+");

			Assert.IsTrue (v.CanValidate (typeof (string)));
			Assert.IsFalse (v.CanValidate (typeof (int)));
			Assert.IsFalse (v.CanValidate (typeof (object)));
		}
All Usage Examples Of System.Configuration.RegexStringValidator::CanValidate