Skip to content

Commit c5c1d01

Browse files
author
Ron Petrusha
authored
Update Double.xml
1 parent 37ea7af commit c5c1d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System/Double.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@
18551855
18561856
The `s` parameter is interpreted using the formatting information in a <xref:System.Globalization.NumberFormatInfo> object that is initialized for the current thread culture. For more information, see <xref:System.Globalization.NumberFormatInfo.CurrentInfo%2A>. To parse a string using the formatting information of some other culture, call the <xref:System.Double.Parse%28System.String%2CSystem.IFormatProvider%29?displayProperty=nameWithType> or <xref:System.Double.Parse%28System.String%2CSystem.Globalization.NumberStyles%2CSystem.IFormatProvider%29?displayProperty=nameWithType> method.
18571857
1858-
Ordinarily, if you pass the <xref:System.Double.Parse%2A?displayProperty=nameWithType> method a string that is created by calling the <xref:System.Double.ToString%2A?displayProperty=nameWithType> method, the original <xref:System.Double> value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either <xref:System.Double.MinValue?displayProperty=nameWithType> or <xref:System.Double.MaxValue?displayProperty=nameWithType> fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an <xref:System.OverflowException>. On .NET Core 3.0 and later versions, it returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> if you attempt to parse <xref:System.Double.MinValue?displayProperty=nameWithtype> or <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> if you attempt to parse <xref:System.Double.MaxValue?displayProperty=nameWithtype>. The following example provides an illustration.
1858+
Ordinarily, if you pass the <xref:System.Double.Parse%2A?displayProperty=nameWithType> method a string that is created by calling the <xref:System.Double.ToString%2A?displayProperty=nameWithType> method, the original <xref:System.Double> value is returned. However, on .NET Framework and on .NET Core 2.2 and earlier versions, the values may not be equal because of a loss of precision. In addition, attempting to parse the string representation of either <xref:System.Double.MinValue?displayProperty=nameWithType> or <xref:System.Double.MaxValue?displayProperty=nameWithType> fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an <xref:System.OverflowException>. The following example provides an illustration.
18591859
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)]

0 commit comments

Comments
 (0)