blob: 9edc18f7e485ef991471856ab7325806a62a9b28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System;
public static class Validators
{
public static bool HasType(Type[] types, Type type)
{
return types.Contains(type);
}
public static bool InIntegerRange(long value)
{
return value >= int.MinValue && value <= int.MaxValue;
}
public static bool InUIntegerRange(long value)
{
return value >= uint.MinValue && value <= uint.MaxValue;
}
}
|