What is the standard way in C# to check if a number is within a range of numbers? Typically, I would do some variation of this with int
i
return (i >= start && i <= end);
// does not work return (start <= i <= end);
The most close to what you expect is
return start <= i && i <= end;