cs11dotnet7/docs/errata/errata.md
2022-11-01 17:07:19 +00:00

3.6 KiB

Errata

If you find any mistakes, then please raise an issue in this repository or email me at markjprice (at) gmail.com.

Page n - Understanding the journey to one .NET and Understanding .NET support

Even-numbered .NET releases like .NET 6 and .NET 8 have a support level named Long Term Support (LTS) with a duration of 3 years. Odd-numbered .NET releases like .NET 5 and .NET 7 had a support level named Current with a duration of 18 months.

On June 6, 2022, the .NET team proposed to change the support level name from Current to Short Term Support (STS) to complement the existing Long Term Support (LTS). I updated the drafts of my book to reflect that change.

On October 11, 2022, the .NET team changed the name again, to Standard Support, probably because Microsoft Marketing decided that "short term" sounded too negative. My editors and I scrambled to update the final drafts of my book to reflect that change.

On October 28, 2022, the .NET team changed the name again, to Standard Term Support (STS), probably because an initialism of SS is problematic and internal code and configuration was already using sts. Sadly, it was too late to update the PDFs that are sent to print.

Sigh. Such are the perils of trying to be up-to-date on release day.

Page n - Formatting using numbered positional arguments

At the end of the section, I say, "The Write, WriteLine, and Format methods can have up to four numbered arguments, named arg0, arg1, arg2, and arg3. If you need to pass more than four values, then you cannot name them, as shown in the following code:"

// Four parameter values can use named arguments.
Console.WriteLine(
 format: "{0} {1} lived in {2}, {3}.", 
 arg0: "Roger", arg1: "Cevung", 
 arg2: "Stockholm", arg3: "Sweden");

// Five or more parameter values cannot use named arguments.
Console.WriteLine(
 format: "{0} {1} lived in {2}, {3} and worked in the {4} team at {5}.", 
 "Roger", "Cevung", "Stockholm", "Sweden", "Education", "Optimizely");

But the methods can only have up to three named arguments. I should have said, "The Write, WriteLine, and Format methods can have up to three numbered arguments, named arg0, arg1, and arg2. If you need to pass more than three values, then you cannot name them, as shown in the following code:"

// Three parameter values can use named arguments.
Console.WriteLine(
 format: "{0} {1} lived in {2}.", 
 arg0: "Roger", arg1: "Cevung", arg2: "Stockholm");

// Four or more parameter values cannot use named arguments.
Console.WriteLine(
 "{0} {1} lived in {2} and worked in the {3} team at {4}.", 
 "Roger", "Cevung", "Stockholm", "Education", "Optimizely");

Page n - Running unit tests using Visual Studio Code

Thanks to kwatsonkairosmgt for raising this issue on 27 October 2022.

In Step 1, the project name CalculatorLibUnitTest should be CalculatorLibUnitTests.