Beispiel #1
0
 /// <summary>
 /// Throws an <see cref="ArgumentNullException"/> if the given value is null
 /// </summary>
 public static void IfNull <T>(T value, string parameterName)
 {
     Throw <ArgumentNullException> .If(value == null, parameterName);
 }
Beispiel #2
0
 /// <summary>
 /// Throws an <see cref="ArgumentException"/> if the given condition is true
 /// </summary>
 public static void If(bool condition, string parameterName)
 {
     Throw <ArgumentException> .If(condition, parameterName);
 }