@@ -534,7 +534,7 @@ public static decimal Parse(string s, NumberStyles style, IFormatProvider? provi
534534
535535 public static decimal Parse ( ReadOnlySpan < char > s , NumberStyles style = NumberStyles . Number , IFormatProvider ? provider = null )
536536 {
537- NumberFormatInfo . ValidateParseStyleFloatingPoint ( style ) ;
537+ NumberFormatInfo . ValidateParseStyleDecimal ( style ) ;
538538 return Number . ParseDecimal ( s , style , NumberFormatInfo . GetInstance ( provider ) ) ;
539539 }
540540
@@ -550,7 +550,7 @@ public static decimal Parse(ReadOnlySpan<char> s, NumberStyles style = NumberSty
550550
551551 public static bool TryParse ( [ NotNullWhen ( true ) ] string ? s , NumberStyles style , IFormatProvider ? provider , out decimal result )
552552 {
553- NumberFormatInfo . ValidateParseStyleFloatingPoint ( style ) ;
553+ NumberFormatInfo . ValidateParseStyleDecimal ( style ) ;
554554
555555 if ( s == null )
556556 {
@@ -562,7 +562,7 @@ public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, I
562562
563563 public static bool TryParse ( ReadOnlySpan < char > s , NumberStyles style , IFormatProvider ? provider , out decimal result )
564564 {
565- NumberFormatInfo . ValidateParseStyleFloatingPoint ( style ) ;
565+ NumberFormatInfo . ValidateParseStyleDecimal ( style ) ;
566566 return Number . TryParseDecimal ( s , style , NumberFormatInfo . GetInstance ( provider ) , out result ) == Number . ParsingStatus . OK ;
567567 }
568568
@@ -1834,14 +1834,14 @@ private static bool TryConvertTo<TOther>(decimal value, [MaybeNullWhen(false)] o
18341834 /// <inheritdoc cref="INumberBase{TSelf}.Parse(ReadOnlySpan{byte}, NumberStyles, IFormatProvider?)" />
18351835 public static decimal Parse ( ReadOnlySpan < byte > utf8Text , NumberStyles style = NumberStyles . Number , IFormatProvider ? provider = null )
18361836 {
1837- NumberFormatInfo . ValidateParseStyleInteger ( style ) ;
1837+ NumberFormatInfo . ValidateParseStyleDecimal ( style ) ;
18381838 return Number . ParseDecimal ( utf8Text , style , NumberFormatInfo . GetInstance ( provider ) ) ;
18391839 }
18401840
18411841 /// <inheritdoc cref="INumberBase{TSelf}.TryParse(ReadOnlySpan{byte}, NumberStyles, IFormatProvider?, out TSelf)" />
18421842 public static bool TryParse ( ReadOnlySpan < byte > utf8Text , NumberStyles style , IFormatProvider ? provider , out decimal result )
18431843 {
1844- NumberFormatInfo . ValidateParseStyleInteger ( style ) ;
1844+ NumberFormatInfo . ValidateParseStyleDecimal ( style ) ;
18451845 return Number . TryParseDecimal ( utf8Text , style , NumberFormatInfo . GetInstance ( provider ) , out result ) == Number . ParsingStatus . OK ;
18461846 }
18471847
0 commit comments