Method IsNullOrBetween
IsNullOrBetween<T>(T?, T, T, string)
Ensures that the value of a parameter is null or is between a minimum and a maximum value.
public static T? IsNullOrBetween<T>(T? value, T min, T max, string paramName) where T : struct, IComparable<T>
Parameters
valueT?The value of the parameter.
minTThe minimum value.
maxTThe maximum value.
paramNamestringThe name of the parameter.
Returns
- T?
The value of the parameter.
Type Parameters
TType type of the value.