markjprice/apps-services-net7

String Interpolation and String Format in same line.

Closed this issue · 1 comments

Please check that your issue is not already in the errata aka list of corrections and improvements. Please note that PRs will be ignored because code in the repo must match the print book already published. Please raise an issue instead so I can handle it appropriately. All issues will be entered into the errata once closed and fixed in the next book edition.

Chapter: 7
Page Number: 254
Section Title: Localizing the DayOfWeek enum
Problem to fix: WriteLine($"The day of the week is {0:dddd}.", DateTime.Now);
Suggested solution: WriteLine("The day of the week is {0:dddd}.", DateTime.Now);
OR
WriteLine($"The day of the week is {DateTime.Now:dddd}.");
Other useful information e.g. OS, coding tools, and so on: