Skip to content

ToString Method in C#: .NET 10, culture-correct overloads and a record sample - #2347

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/78331-tostring-method-csharp
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/78331-tostring-method-csharp

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves strings-csharp/ToStringMethod to net10.0 with current xunit packages. The culture overload of Car.ToString now formats the sale date with the same culture as the price, the tests expect the real en-GB and ja-JP date formats instead of the invariant one, Program.cs prints every call with a fixed sale date, and a new PersonRecord with one test shows the ToString that records generate.

…ample

Both projects move to net10.0 with current xunit packages. The culture overload now formats the sale date with the same culture as the price, the tests expect the real en-GB and ja-JP formats, Program.cs prints every call with a fixed date, and a PersonRecord sample with its test shows the compiler-generated ToString.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant