Closed
Description
Type of issue
Code doesn't work
Description
For https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#round-trip-format-specifier-r , It shows a code example for using the round trip format specifier R on a double; however the code example has a comment at the end of the expected output. However; in my testing it has a result like this:
2 questions:
- Is the sample code now incorrect since Update the double/float formatters to return the shortest roundtrippable string. coreclr#22040 and
.ToString()
by default is round-trip compatible? Maybe adbb5e9 just didn't change enough? - When is a necessary use for the round-trip format specifier now (maybe for some data types; but doesn't seem like it is necessary for decimal anymore).
Page URL
https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
Content source URL
Document Version Independent Id
f23035e0-f271-b48c-f9a9-8582be80b4ad
Article author
Metadata
- ID: 0ae38fce-fc98-9420-6b0b-ceee4e885f2d
- Service: dotnet-fundamentals