Add new resource string with correct bounds (#42349)
authorShaun McFall <shaunm.mcfall@gmail.com>
Sun, 11 Oct 2020 03:21:15 +0000 (23:21 -0400)
committerGitHub <noreply@github.com>
Sun, 11 Oct 2020 03:21:15 +0000 (03:21 +0000)
Use new resource string in MathF.Round

src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
src/libraries/System.Private.CoreLib/src/System/MathF.cs

index 8654f04..4cd55c0 100644 (file)
   <data name="ArgumentOutOfRange_RoundingDigits" xml:space="preserve">
     <value>Rounding digits must be between 0 and 15, inclusive.</value>
   </data>
+  <data name="ArgumentOutOfRange_RoundingDigits_MathF" xml:space="preserve">
+    <value>Rounding digits must be between 0 and 6, inclusive.</value>
+  </data>
   <data name="ArgumentOutOfRange_SmallCapacity" xml:space="preserve">
     <value>capacity was less than the current size.</value>
   </data>
index 58b865d..67707d7 100644 (file)
@@ -344,7 +344,7 @@ namespace System
         {
             if ((digits < 0) || (digits > maxRoundingDigits))
             {
-                throw new ArgumentOutOfRangeException(nameof(digits), SR.ArgumentOutOfRange_RoundingDigits);
+                throw new ArgumentOutOfRangeException(nameof(digits), SR.ArgumentOutOfRange_RoundingDigits_MathF);
             }
 
             if (mode < MidpointRounding.ToEven || mode > MidpointRounding.ToPositiveInfinity)