/// <summary> /// Ensures a param is greater than <paramref name="value" />. /// </summary> /// <param name="param">Parameter to check.</param> /// <param name="value">Value that the parameter must be greater than.</param> /// <param name="paramName">Name of the parameter.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="param" /> must be greater than <paramref name="value" />.</exception> public static void GreaterThan(uint param, uint value, string paramName = null) { if (param <= value) { ExceptionThrower.ThrowGreaterThanException(value.ToString(), paramName); } }
/// <summary> /// Ensures a param is greater than <paramref name="value" />. /// </summary> /// <param name="param">Parameter to check.</param> /// <param name="value">Value that the parameter must be greater than.</param> /// <param name="paramName">Name of the parameter.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="param" /> must be greater than <paramref name="value" />.</exception> public static void GreaterThan(decimal param, decimal value, string paramName = null) { if (param <= value) { ExceptionThrower.ThrowGreaterThanException(value.ToString(CultureInfo.InvariantCulture), paramName); } }