Skip to content

Commit d94b4f9

Browse files
authored
Update Double.xml (dotnet#5358)
may be is typos
1 parent a07b818 commit d94b4f9

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
@@ -235,7 +235,7 @@
235235
236236
In addition, <xref:System.Double.NaN?displayProperty=nameWithType>, <xref:System.Double.PositiveInfinity?displayProperty=nameWithType>, and <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> throw an <xref:System.OverflowException> for conversions to integers in a checked context, but these values overflow when converted to integers in an unchecked context. For conversions to <xref:System.Decimal>, they always throw an <xref:System.OverflowException>. For conversions to <xref:System.Single>, they convert to <xref:System.Single.NaN?displayProperty=nameWithType>, <xref:System.Single.PositiveInfinity?displayProperty=nameWithType>, and <xref:System.Single.NegativeInfinity?displayProperty=nameWithType>, respectively.
237237
238-
Note that a loss of precision may result from converting a <xref:System.Double> value to another numeric type. In the case of converting non-integral <xref:System.Double> values, as the output from the example shows, the fractional component is lost when the <xref:System.Double> value is either rounded (as in Visual Basic) or truncated (as in C#). For conversions to <xref:System.Decimal> and <xref:System.Single> values, the <xref:System.Double> value may not have a precise representation in the target data type.
238+
Note that a loss of precision may result from converting a <xref:System.Double> value to another numeric type. In the case of converting to any of the integral types, as the output from the example shows, the fractional component is lost when the <xref:System.Double> value is either rounded (as in Visual Basic) or truncated (as in C#). For conversions to <xref:System.Decimal> and <xref:System.Single> values, the <xref:System.Double> value may not have a precise representation in the target data type.
239239
240240
The following example converts a number of <xref:System.Double> values to several other numeric types. The conversions occur in a checked context in Visual Basic (the default) and in C# (because of the [checked](/dotnet/csharp/language-reference/keywords/checked) keyword). The output from the example shows the result for conversions in both a checked an unchecked context. You can perform conversions in an unchecked context in Visual Basic by compiling with the `/removeintchecks+` compiler switch and in C# by commenting out the `checked` statement.
241241

0 commit comments

Comments
 (0)