Skip to content

Round Trip Format Example - Outdated code sample or no longer needed? #41766

Closed
@BenjaminMichaelis

Description

@BenjaminMichaelis

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:
image

2 questions:

  1. 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?
  2. 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

https://github.com/dotnet/docs/blob/main/docs/standard/base-types/standard-numeric-format-strings.md

Document Version Independent Id

f23035e0-f271-b48c-f9a9-8582be80b4ad

Article author

@adegeo

Metadata

  • ID: 0ae38fce-fc98-9420-6b0b-ceee4e885f2d
  • Service: dotnet-fundamentals

Associated WorkItem - 294938

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-fundamentals/svcin-prThis issue will be closed (fixed) by an active pull request.okr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions