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

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

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

Usage Example

Пример #1
0
		public void CanValidate ()
		{
			IntegerValidator v = new IntegerValidator (1, 1);

			Assert.IsFalse (v.CanValidate (typeof (TimeSpan)), "A1");
			Assert.IsTrue (v.CanValidate (typeof (int)), "A2");
			Assert.IsFalse (v.CanValidate (typeof (long)), "A3");
		}