System.Net.ValidationHelper.ValidateRange C# (CSharp) Method

ValidateRange() public static method

public static ValidateRange ( int actual, int fromAllowed, int toAllowed ) : bool
actual int
fromAllowed int
toAllowed int
return bool
        public static bool ValidateRange(int actual, int fromAllowed, int toAllowed) {
            // on false, API should throw new ArgumentOutOfRangeException("argument");
            return actual>=fromAllowed && actual<=toAllowed;
        }