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