ThrowIfGreaterThanOrEqual Method
Definition
ThrowIfGreaterThanOrEqual<T>(T, T, string, string)
Validates and throws an ArgumentOutOfRangeException if the specified x is greater than or equal to y.
public static void ThrowIfGreaterThanOrEqual<T>(T x, T y, string paramName, string message = null) where T : struct, IConvertible
Parameters
xTThe first object to compare.
yTThe second object to compare.
paramNamestringThe name of the parameter that caused the exception.
messagestringA message that describes the error.
Type Parameters
TThe type of objects to compare.
Exceptions
- ArgumentOutOfRangeException
xis greater than or equal toy.