1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 23:25:43 +00:00

(#27) Move string literal ex msg to resource file

This commit is contained in:
Oliver Booth 2021-03-09 11:45:19 +00:00
parent 7d1dbee0dc
commit 0d00dd62e8
2 changed files with 4 additions and 1 deletions

View File

@ -47,4 +47,7 @@
<data name="StreamDoesNotSupportWriting" xml:space="preserve">
<value>The stream does not support writing.</value>
</data>
<data name="MaxValueGreaterThanEqualToMinValue" xml:space="preserve">
<value>maxValue must be greater than or equal to minValue</value>
</data>
</root>

View File

@ -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;