IsWithinRange Method
Definition
IsWithinRange<T>(T, T, T)
Determines whether the specified x is within range of min and max.
public static bool IsWithinRange<T>(T x, T min, T max) where T : struct, IConvertible
Parameters
xTThe object to compare.
minTThe minimum value of
x.maxTThe maximum value of
x.
Returns
- bool
trueifxis within range ofminandmax; otherwisefalse.
Type Parameters
TThe type of objects to compare.