Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Essential C# 8.0 Errata Document

Essential C# 8.0

by Mark Michaelis ISBN-13: 978-0-13-597226-7 IISBN-10: 0-13-597226-4 Copyright © 2021 Pearson Education, Inc. First printing, October 2020

The following corrections will be made in the second printing. (To determine which printing you have, turn to page IV of your book. The last line on that page contains the printing information.)

Found by Chapter Page Correction
Salim Gangji 1 12 First paragraph: For a single executable, append /p:PublishSingleFile=true -p:PublishSingleFile=true to the command
Pieter Le Roux 1 31 Last Line: Table 1.2 shows four different C# comment types. The program in Listing 1.18 Listing 1.19 includes two of these.
Benjamin Michaelis 1 31 Last Line: Table 1.2 shows four different C# comment types. The program in Listing 1.19 includes twothree of these.
Salim Gangji 2 51 Output 2.3: 1.61803398874985 1.618033988749895
Alden Bansemer 2 55 Listing 2.9: result == number {result} == {number}. Output 2.7: result == number 1.61803398874989 == 1.61803398874989.
Alden Bansemer 3 89 Listing 3.4: Changed class 3.2->3.Uppercase to match source class Uppercase.
Alden Bansemer 3 113 Output 3.2: TypeScript replaced with Visual Basic as last element in sorted array and first element in the reversed, sorted array.
Alden Bansemer 3 114 Output 3.3: Added missing second line of output: 3.
Alden Bansemer 4 129 Listing 4.7: Removed Trace.Assert to match codebase. Removed example #4, float converted to double now matches the double.
Alden Bansemer 4 130 Output 4.6: Updated results of Listing 4.7 to remove 4.20000006258488 != 4.20000028610229.
Pieter Le Roux 5 215 Output 5.4: ERROR: You must specify the URL to be downloaded and the file name Usage: Downloader.exe
Pieter Le Roux 6 285 Last Line in second paragraph: "DO use nameof for the paramName argument passed into exceptions like ArgumentNullException and ArgumentNullException that take such a parameter. For more information, see Chapter 18."
Pieter Le Roux 7 359 return @$"FirstName: { FirstName + NewLine }" + $"LastName: { LastName + NewLine }"+ $"Address: { Address + NewLine }";
Benjamin Michaelis 7 359 make the s in 'string bold' "set { string[] names = value.Split(' ');"
Pieter Le Roux 10 452 Last paragraph: "so overloading overriding the method" "Consider overloadingoverriding the ToString() method "
Pieter Le Roux 10 458 Output 10.2: "serialNumber1 reference equals serialNumber2 serialNumber1 equals serialNumber2 serialNumber1 equals serialNumber3"
Pieter Le Roux 10 460 Note: "The implementation of object.Equals(), the default implementation on all objects before overloadingoverriding, relies on ReferenceEquals() alone."
Pieter Le Roux 10 464 "To correct this flaw, it is important to overloadoverride the equals (==) and not equals (!=) operators as well
Pieter Le Roux 12 581 Listing 12.47: .class privatepublic auto ansi beforefieldinit Stack'1<([mscorlibSystem.Runtime]System.IComparable)** **T> extends [mscorlibSystem.Runtime]System.Object { ... }
Benjamin Michaelis 12 582 Listing 12.48: .class public auto ansi beforefieldinit 'Stack'1'<([mscorlibSystem.Runtime]System.IComparable) T> extends [mscorlibSystem.Runtime]System.Object { .field private !0T[ ] _Items ... }
Pieter Le Roux 12 542 "you can see that the type parameter will be used for the internal ItemsInternalItems array, the type for the parameter to the"
Pieter Le Roux 12 547 "constructor that takes the initial values for both First and Secondfirst and second and assigns them to First and Second."
Pieter Le Roux 12 551 "// Use System.ValueTuple<string,Contact> prior to C# 7.0 "
Pieter Le Roux 12 579 "Consider the IPairInitializer interface in Listing 12.45."
Pieter Le Roux 13 602 "the compiler can seeinfer that the lambda"
Pieter Le Roux 14 639 Output 14.2: "Enter temperature: 45 Heater: On Error in the application Cooler: Off Enter temperature: 45 Heater: On Cooler: Off There were exceptions thrown by OnTemperatureChange Event subscribers. (Operation is not valid due to the current state of the object.)"
Pieter Le Roux 15 686 tabs in Output 15.9 doesn't reflect Listing 15.21. Fixed by updating source code
Pieter Le Roux 15 700 // ERROR: Cannot implicitly convert type // 'AnonymousType#3#1' to 'AnonymousType#2#3'
Pieter Le Roux 16 706 Reorder keywords to alphabetical order in Listing 16.1, and add missing keywords
Pieter Le Roux 16 707 "private static void ShowContextualKeywords1()"
Pieter Le Roux 16 712 Output 16.3 is missing "when"
Pieter Le Roux 16 715 "File.GetLastWriteTime(fileName)"
Pieter Le Roux 16 719 Add "when" to Output 16.6 ("when*" was missing from source code)
Pieter Le Roux 16 721 Add "when" to Output 16.7 ("when*" was missing from source code)
Pieter Le Roux 16 725 in Listing 16.16 and Listing 16.17, add "!" prior to "word. Contains('*')" to match Listing 16.01
Pieter Le Roux 17 733 Saw List[6] could throw error. Changed to "{ List[6^1] }
Pieter Le Roux 17 760 "as you did in both CSharpPrimitiveTypesBuiltInTypes"
Pieter Le Roux 18 776 errorMessage listed twice in listing 18.3
Pieter Le Roux 18 807 "let's reexamine Listing 18.2818.27. Notice the call to retrieve the "FirstName" element:"
Pieter Le Roux 19 824 "The worker thread will write periodsplus signs to the console
Pieter Le Roux 19 825 lambda expression prints out dasheshyphens to the console repeatedly.
Pieter Le Roux 19 840 "(c)(3)"