Beispiel #1
0
 /// <summary>
 /// Check the value is greater than or equal to zero.
 /// </summary>
 /// <param name="value">The value to check.</param>
 /// <param name="paramName">The parameter name.</param>
 /// <exception cref="ArgumentOutOfRangeException">If the value is less than zero.</exception>
 public static void NotNegativeDecimal(decimal value, string paramName)
 {
     if (value < decimal.Zero)
     {
         throw new ArgumentOutOfRangeException(paramName, FailedMsg.WasNegative(value, paramName));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Check the value is greater than or equal to zero.
 /// </summary>
 /// <param name="value">The value to check.</param>
 /// <param name="paramName">The parameter name.</param>
 /// <exception cref="ArgumentOutOfRangeException">If the value is less than zero.</exception>
 public static void NotNegativeDouble(double value, string paramName)
 {
     if (value < 0)
     {
         throw new ArgumentOutOfRangeException(paramName, FailedMsg.WasNegative(value, paramName));
     }
 }