diff --git a/X10D/src/ExceptionMessages.resx b/X10D/src/ExceptionMessages.resx index 8b63ce8..218eecb 100644 --- a/X10D/src/ExceptionMessages.resx +++ b/X10D/src/ExceptionMessages.resx @@ -47,4 +47,7 @@ The stream does not support writing. + + maxValue must be greater than or equal to minValue + \ No newline at end of file diff --git a/X10D/src/RandomExtensions/RandomExtensions.cs b/X10D/src/RandomExtensions/RandomExtensions.cs index b5466d8..e738b62 100644 --- a/X10D/src/RandomExtensions/RandomExtensions.cs +++ b/X10D/src/RandomExtensions/RandomExtensions.cs @@ -81,7 +81,7 @@ namespace X10D.RandomExtensions if (maxValue < minValue) { - throw new ArgumentException("maximum must be greater than or equal to minimum."); + throw new ArgumentOutOfRangeException(ExceptionMessages.MaxValueGreaterThanEqualToMinValue); } return random.NextDouble() * (maxValue - minValue) + minValue;