Skip to content

Commit 6dabc00

Browse files
committed
Fix incorrect case sensitivity in floating-point number parsing methods
1 parent 330c8a7 commit 6dabc00

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

xml/System/Double.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4814,7 +4814,7 @@ The following code example illustrates the use of <xref:System.Double.NegativeIn
48144814
## Remarks
48154815
In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure.
48164816

4817-
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType>, or a string of the form:
4817+
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or a string of the form:
48184818

48194819
[*ws*][*sign*][*integral-digits*[*,*]]*integral-digits*[*.*[*fractional-digits*]][E[*sign*]*exponential-digits*][*ws*]
48204820

@@ -5020,7 +5020,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
50205020

50215021
- <xref:System.Globalization.NumberStyles.HexNumber>
50225022

5023-
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType>. Depending on the value of `style`, it can also take the form:
5023+
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework). Depending on the value of `style`, it can also take the form:
50245024

50255025
[*ws*][*$*][*sign*][*integral-digits*[*,*]]*integral-digits*[*.*[*fractional-digits*]][E[*sign*]*exponential-digits*][*ws*]
50265026

@@ -5168,7 +5168,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
51685168

51695169
This overload of the <xref:System.Double.Parse%28System.String%2CSystem.IFormatProvider%29> method is typically used to convert text that can be formatted in a variety of ways to a <xref:System.Double> value. For example, it can be used to convert the text that is entered by a user into an HTML text box to a numeric value.
51705170

5171-
The `s` parameter is interpreted using a combination of the <xref:System.Globalization.NumberStyles.Float?displayProperty=nameWithType> and <xref:System.Globalization.NumberStyles.AllowThousands?displayProperty=nameWithType> flags. The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture specified by `provider`, or it can contain a string of the form:
5171+
The `s` parameter is interpreted using a combination of the <xref:System.Globalization.NumberStyles.Float?displayProperty=nameWithType> and <xref:System.Globalization.NumberStyles.AllowThousands?displayProperty=nameWithType> flags. The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture specified by `provider` (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or it can contain a string of the form:
51725172

51735173
[*ws*][*sign*]*integral-digits*[*.*[*fractional-digits*]][E[*sign*]*exponential-digits*][*ws*]
51745174

@@ -5409,7 +5409,7 @@ If `s` is out of range of the <xref:System.Double> data type, the method returns
54095409

54105410
- <xref:System.Globalization.NumberStyles.HexNumber>
54115411

5412-
The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture specified by `provider`. Depending on the value of `style`, it can also take the form:
5412+
The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture specified by `provider` (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework). Depending on the value of `style`, it can also take the form:
54135413

54145414
[*ws*] [*$*] [*sign*][*integral-digits*,]*integral-digits*[.[*fractional-digits*]][E[*sign*]*exponential-digits*][*ws*]
54155415

@@ -9313,7 +9313,7 @@ Tau is approximately 6.2831853071795864769.
93139313
|A specific format or precision|Default (current) culture|<xref:System.Double.ToString%28System.String%29>|
93149314
|A specific format or precision|A specific culture|<xref:System.Double.ToString%28System.String%2CSystem.IFormatProvider%29>|
93159315

9316-
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A>, or a string of the form:
9316+
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or a string of the form:
93179317

93189318
[sign]integral-digits[.[fractional-digits]][E[sign]exponential-digits]
93199319

@@ -9435,7 +9435,7 @@ Tau is approximately 6.2831853071795864769.
94359435
|A specific format or precision|Default (current) culture|<xref:System.Double.ToString%28System.String%29>|
94369436
|A specific format or precision|A specific culture|<xref:System.Double.ToString%28System.String%2CSystem.IFormatProvider%29>|
94379437

9438-
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A>, or a string of the form:
9438+
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or a string of the form:
94399439

94409440
[sign]integral-digits[.[fractional-digits]][E[sign]exponential-digits]
94419441

@@ -9560,7 +9560,7 @@ Tau is approximately 6.2831853071795864769.
95609560
|Default ("G") format|A specific culture|<xref:System.Double.ToString%28System.IFormatProvider%29>|
95619561
|A specific format or precision|A specific culture|<xref:System.Double.ToString%28System.String%2CSystem.IFormatProvider%29>|
95629562

9563-
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A>, or the string representation of a number, as specified by `format`.
9563+
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or the string representation of a number, as specified by `format`.
95649564

95659565
The `format` parameter can be any valid standard numeric format specifier except for D and X, as well as any combination of custom numeric format specifiers. If `format` is `null` or an empty string, the return value is formatted with the general numeric format specifier ("G").
95669566

@@ -9682,7 +9682,7 @@ Tau is approximately 6.2831853071795864769.
96829682
|Default ("G") format|A specific culture|<xref:System.Double.ToString%28System.IFormatProvider%29>|
96839683
|A specific format or precision|Default (current) culture|<xref:System.Double.ToString%28System.String%29>|
96849684

9685-
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A>, or the string representation of a number, as specified by `format`.
9685+
The return value can be <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or the string representation of a number, as specified by `format`.
96869686

96879687
The `format` parameter can be any valid standard numeric format specifier except for D and X, as well as any combination of custom numeric format specifiers. If `format` is `null` or an empty string, the return value for this instance is formatted with the general numeric format specifier ("G").
96889688

@@ -10055,7 +10055,7 @@ Tau is approximately 6.2831853071795864769.
1005510055

1005610056
This overload differs from the <xref:System.Double.Parse%28System.String%29?displayProperty=nameWithType> method by returning a Boolean value that indicates whether the parse operation succeeded instead of returning the parsed numeric value. It eliminates the need to use exception handling to test for a <xref:System.FormatException> in the event that `s` is invalid and cannot be successfully parsed.
1005710057

10058-
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> (the string comparison is case-sensitive), or a string of the form:
10058+
The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework), or a string of the form:
1005910059

1006010060
[ws][sign][integral-digits,]integral-digits[.[fractional-digits]][e[sign]exponential-digits][ws]
1006110061

@@ -10431,7 +10431,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
1043110431

1043210432
- <xref:System.Globalization.NumberStyles.HexNumber?displayProperty=nameWithType>
1043310433

10434-
The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture indicated by `provider`. In addition, depending on the value of `style`, the `s` parameter may include the following elements:
10434+
The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture indicated by `provider` (the string comparison is case-insensitive in .NET Core 3.0 and later, but is case-sensitive in prior versions including .NET Framework). In addition, depending on the value of `style`, the `s` parameter may include the following elements:
1043510435

1043610436
[ws] [$] [sign][integral-digits,]integral-digits[.fractional-digits][e[sign]exponential-digits][ws]
1043710437

0 commit comments

Comments
 (0)