diff --git a/X10D/src/ComparableExtensions/ComparableExtensions.cs b/X10D/src/ComparableExtensions/ComparableExtensions.cs index b1e0b49..a38de3b 100644 --- a/X10D/src/ComparableExtensions/ComparableExtensions.cs +++ b/X10D/src/ComparableExtensions/ComparableExtensions.cs @@ -46,6 +46,11 @@ namespace X10D public static bool Between(this T1 value, T2 lower, T3 upper) where T1 : IComparable, IComparable { + if (value is null) + { + throw new ArgumentNullException(nameof(value)); + } + return value.CompareTo(lower) > 0 && value.CompareTo(upper) < 0; }