Skip to content

Commit 391dac2

Browse files
committed
further refinement
1 parent 2884b17 commit 391dac2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

xml/System/Double.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,9 +1860,7 @@
18601860
[!code-csharp[System.Double.Parse#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Double.Parse/cs/parse2.cs#3)]
18611861
[!code-vb[System.Double.Parse#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Double.Parse/vb/parse2.vb#3)]
18621862
1863-
If `s` is out of range of the <xref:System.Double> data type, the method throws an <xref:System.OverflowException> on .NET Framework and .NET Core 2.2 and earlier versions.
1864-
1865-
On .NET Core 3.0 and later versions, if `s` is greater than `double.MaxValue + (double.MaxValue - Math.BitDecrement(double.MaxValue))`, or approximately 1.7976931348623159E+308, the method returns <xref:System.Double.PositiveInfinity?displayProperty=nameWithType>. If `s` is greater than <xref:System.Double.MaxValue?displayProperty=nameWithType> but less than `double.MaxValue + (double.MaxValue - Math.BitDecrement(double.MaxValue))`, the method returns <xref:System.Double.MaxValue?displayProperty=nameWithType>. Similarly, if `s` is less than `double.MinValue - (double.MinValue + Math.BitDecrement(double.MinValue))`, or approximately -1.7976931348623159E+308, the method returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType>. If `s` is less than <xref:System.Double.MinValue?displayProperty=nameWithType> but greater than `double.MinValue - (double.MinValue + Math.BitDecrement(double.MinValue))`, the method returns <xref:System.Double.MinValue?displayProperty=nameWithType>.
1863+
If `s` is out of range of the <xref:System.Double> data type, the method throws an <xref:System.OverflowException> on .NET Framework and .NET Core 2.2 and earlier versions. On .NET Core 3.0 and later versions, no exception is thrown when `s` is out of range of the <xref:System.Double> data type. In most cases, the method will return <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Double.NegativeInfinity?displayProperty=nameWithType>. However, there is a small set of values that are considered to be closer to the maximum or minimum values of <xref:System.Double> than to positive or negative infinity. In those cases, the method returns <xref:System.Double.MaxValue?displayProperty=nameWithType> or <xref:System.Double.MinValue?displayProperty=nameWithType>. Specifically, if `s` is greater than <xref:System.Double.MaxValue?displayProperty=nameWithType> but less than `double.MaxValue + (double.MaxValue - Math.BitDecrement(double.MaxValue))`, the method returns <xref:System.Double.MaxValue?displayProperty=nameWithType>. Similarly, if `s` is less than <xref:System.Double.MinValue?displayProperty=nameWithType> but greater than `double.MinValue - (double.MinValue + Math.BitDecrement(double.MinValue))`, the method returns <xref:System.Double.MinValue?displayProperty=nameWithType>.
18661864
18671865
If a separator is encountered in the `s` parameter during a parse operation, and the applicable currency or number decimal and group separators are the same, the parse operation assumes that the separator is a decimal separator rather than a group separator. For more information about separators, see <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalSeparator%2A>, <xref:System.Globalization.NumberFormatInfo.NumberDecimalSeparator%2A>, <xref:System.Globalization.NumberFormatInfo.CurrencyGroupSeparator%2A>, and <xref:System.Globalization.NumberFormatInfo.NumberGroupSeparator%2A>.
18681866

0 commit comments

Comments
 (0)