Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
Printed, PDF, ePub, Mobi, , Other Digital Version | Page Multiple pages Multiple locations |
Shortly after the 4th edition went to print, the WPF project type in Visual Studio 2019 changed from "WPF App (.NET Core)" to "WPF App (.NET)", so we needed to make the following changes: |
Andrew Stellman |
Dec 17, 2020 | Dec 18, 2020 |
Printed | Page xxxiv 6th paragraph |
The word "the" appears wrong. The 'e' in the line "benefits from seeing the same content represented in multiple ways" is covered by the background of the graphic "bullet points". |
Anonymous | Jan 01, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page xxxviii Annotation that starts |
Add the names Srikar Thottempudi, Mike Olgren, and Jim Cupec to the list of wonderful readers who we thank. |
Andrew Stellman |
Feb 20, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page Multiple pages Fixing small typos on multiple pages |
Combining fixes to small typos into a single errata entry. |
Andrew Stellman |
Mar 10, 2021 | |
Page n/a text |
Current Copy: Note from the Author or Editor: |
Anonymous | Nov 01, 2021 | ||
Page n/a text |
Current Copy Note from the Author or Editor: |
Anonymous | Nov 01, 2021 | ||
ch 1 (no page numbers listed) `"There are no dumb questions" section at end of section on "Add your project to source control" |
There might be some confusion around the below section: |
David Horton | Nov 28, 2020 | Dec 18, 2020 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 4 Step 1 |
When you create your new project, Visual Studio asks which version of .net to use. I didn’t understand what to do since I don’t know the implications of the different versions. Note from the Author or Editor: |
Jim Cupec | Feb 25, 2021 | |
Page 8 second screen shot image |
The WPF App selection title (after choosing Create a new project) has changed again. The button now reads "WPF Application." There is nothing in parentheses after the title. The descriptor text has changed to "A project for creating a .NET Core WPF Application." Note from the Author or Editor: |
Mike Olgren | Mar 11, 2021 | ||
Page 22 Step 2 |
redundant semicolon in " public MainWindow(); " Note from the Author or Editor: |
Ruey-Cherng Yu | May 22, 2022 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 30, 31, and 47 Full pages |
Shortly after the 4th edition went to print, the Visual Studio team made significant (and really great!) changes to the Git-related features in Visual Studio 2019. We made extensive updates to pages 30, 31, and 47. The updated versions in the free PDF of chapters 1-4, which you can download from our GitHub page: https://github.com/head-first-csharp/fourth-edition |
Andrew Stellman |
Dec 17, 2020 | Dec 18, 2020 |
Page 44 comment toward bottom of box explaining foreach |
In the comment it says "...it sets oneNumber to the next number..." This should be "...it sets aNumber to the next number..." There is not a variable named oneNumber. |
Mike Olgren | Mar 10, 2021 | ||
Page 60 top images |
The icons used by Visual Studio for Step Into, Step Over, and Step Out have changed, so they are different from what is shown in the images underneath the first paragraph.The new images use simpler dots and arrows. |
Mike Olgren | Mar 11, 2021 | ||
Page 65 bottom right corner "Hint" |
The "Hint" for Loop #3 in the Sharpen your pencil" box calls "p = p * 2" the iterator. Isn't this a statement in the while loop? Isn't "q = q * 2" the only iterator in this code example? In either case, I'm not sure this was helpful to me. Pointing out that the "q = p - q;" statement sometimes results in zero is helpful. However, deleting the words "the iterator" might solve this, unless the intent was to use q instead of p. |
Mike Olgren | Mar 11, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 77 Note with arrow at bottom left of page |
To make sure the reader gets the exception so they can fix it, change the text: "And the XAML code that appears inside the <Grid> after the row and column definitions and before the </Grid> should look like this:" |
Andrew Stellman |
Dec 31, 2020 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 77 and 78 Entire page |
The steps on pages 77 and 78 were accidentally left in the wrong order. This PDF the correct order: https://github.com/head-first-csharp/fourth-edition/raw/master/Additional_material/Corrected_pages_77_and_78.pdf |
Andrew Stellman |
Jan 30, 2021 | |
Printed, PDF | Page 77 Bottom of Sleuth it Out box |
On page 77 of the the original Print Edition or page 78 of the corrected PDF, the last line on the page says "... and the TextBox now only accepts numeric input." That's not true, alphanumeric characters are accepted. At this point, we have done nothing to the control to restrict the type of input. Note from the Author or Editor: |
Jim Cupec | Feb 26, 2021 | Jun 15, 2022 |
Page 79 Step 3. |
3. If the user entered a number, it sets e.Handled to true, which tells WPF to ignore the input. Note from the Author or Editor: |
Anonymous | Jan 11, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 84 Code in step 1 and Step 3 |
Why do we need the "if" statements in the event handlers? I tried to delete them and it didn't recognize the signaler of the event as an identifier. Is this because we did not name the ListBox and the RadioButton? Note from the Author or Editor: |
Jim Cupec | Feb 27, 2021 | |
Page 122 Fourth bullet in step 2 |
In the 4th bullet it says to "expand the Layout section" to set the IsSnapToTickEnabled property to True. This property is in the Common section, so just change "Layout" to "Common." [I found it by using the Search box method taught earlier.] |
Mike Olgren | Mar 15, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 123 Step 5, second bullet |
There's a typo in the second bullet in step 5 on page 123. The bullet should say: |
Andrew Stellman |
Dec 27, 2020 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 147 Summary section of ReceiveCash method |
Very minor detail, but the comment supplied for the amount parameter in the summary states "Amount of cash to give." It should say "Amount of cash to receive." Note from the Author or Editor: |
Mitchell Schaff | Feb 26, 2021 | |
Page 148 4th paragraph |
In the line : "Choose the Name field, set it to 50 and add a comma:" |
Maxime Collin | Apr 23, 2022 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 157 "Character sheet" graphic |
The box next to Strength has the number 911, and the box next to Dexterity is empty. These should be changed: the box next to Strength should have the number 12, and the box next to Dexterity should have the number 15. |
Andrew Stellman |
Feb 04, 2021 | |
Page 160 Floating-Point Numbers Up Close |
Hi, |
Eduardo Rodrigues | Apr 19, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 162 2nd section |
The text in the "Using Suffixes" section refers to actions taken in the Unity labs: Note from the Author or Editor: |
Mitchell Schaff | Feb 27, 2021 | |
Printed | Page 166 Arrowed text on first figure |
The text says float, double and decimal are for fractions. That is true, but it is also to store very large numbers that do not have fractions, e.g., 6023 x 10^20. Note from the Author or Editor: |
Jim Cupec | Feb 28, 2021 | |
Page 166 Last text of the page with an arrow pointing to the string cup |
It says that max length of a string is 2^31, which is 2147483648. However, if it's using the int type, then max length should be 2147483647? |
Anonymous | Jan 29, 2023 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 167 and 483 "Sharpen" on 167, code on 483 |
Change this: int radius = 3; |
Andrew Stellman |
Mar 28, 2022 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 169 1st paragraph |
In the line "256 cast to a byte will have a value of 0, 25 will be converted to 1" Note from the Author or Editor: |
Anonymous | Jan 20, 2021 | |
Page 169 first sentence |
The first sentence appears to refer to the example on the top of the previous page (168; see previously entered errata). That example cast a float to an int. Would change the first sentence to correspond: "You've already seen that a float can be cast to an int." |
Mike Olgren | Mar 17, 2021 | ||
Page 172 2nd-to-last paragraph |
Change "between parameter" to "between a parameter" |
Anonymous | Apr 27, 2021 | ||
Page 177 second sentence |
The second sentence lists the fields starting with "Starting4D6Roll." In the code below, this field is named "RollResult." Fix by replacing "Starting4D6Roll" with "RollResult." |
Mike Olgren | Mar 17, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 188 Bullet 2 |
Guy bob... Cash = 100,... Note from the Author or Editor: |
James Foster | Jan 15, 2021 | |
Page 195 Bullet point 4 |
"When the user presses 3, make the app call a method that exchanges the two references" |
Anonymous | Jul 07, 2021 | ||
Page 200 3rd paragraph |
In the 3rd paragraph, the 2nd sentence. This statement sets the value of the fifth element of myArray to true. |
Chao | Sep 29, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 208 Last Box paragraph |
This method makes a random price between 2.01 and 5.97 by converting two Note from the Author or Editor: |
Eddy Eui Soon Hwang | Jan 15, 2021 | |
Page 208 2nd paragraph |
2nd sentence in the second paragraph starts with "It has four fields..." The MenuItem class diagram pictured on the right has six fields (Randomizer, Proteins, Condiments, Breads, Description, and Price). |
Mike Olgren | Mar 24, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 210 Last line of the MakeTheMenu method |
Change the last line of the MakeTheMenu method from this: |
Andrew Stellman |
Dec 29, 2020 | |
Page 216 graphic, text ballon pointing to 8 ball |
As explained on the next page, the ball will rotate once every two seconds (180 * Time.deltaTime). The last part of the text balloon pointing at the 8-ball says "...a speed of two rotations per second" but should say "...a speed of one rotation per two seconds." |
Mike Olgren | Mar 25, 2021 | ||
Page 234 but it doesn’t add the extra 3 HP for flaming, but in code flaming damage is 2 |
typo Note from the Author or Editor: |
littlefox | Oct 23, 2022 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 236 Bottom of page |
Add a boldfaced note in Arial Black (style "Learner Answer") to the bottom of the page that says this (with the word "after" underlined): |
Andrew Stellman |
Feb 17, 2021 | |
Page 244 Hint method |
Since I am a beginner studying C# I apologize if my explanation is lackluster. Note from the Author or Editor: |
Kristen Kuldmaa | Aug 03, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 259 The error that is displayed in the main method |
After adding the constructor, the main method will throw the error. The displayed error has MachineGun class, but the actual class name is PaintballGun. Note from the Author or Editor: |
Anonymous | Feb 15, 2021 | |
Page 259 last statement in constructor image |
The last statement of the PaintballGun constructor is: |
Mike Olgren | Apr 03, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 260 Wrong class name is used in the error that is displayed in the first paragraph |
The error displayed has the wrong class name "Machinegun" instead of "PaintballGun". Note from the Author or Editor: |
Anonymous | Feb 15, 2021 | |
Page 265, 266 Solution of "price = Price;" statement |
Solution says change the statement to Price = price, but the Price property that defined in class GumballMachine (page 265) doesn't have setter. Note from the Author or Editor: |
Thong Nguyen | Aug 13, 2022 | ||
Page 271 Across #7 |
It looks like the escape sequences were not printed in the question. Note from the Author or Editor: |
David Horvitz | Dec 21, 2021 | ||
Page 271 Down #10 |
There's a grammatical error. |
David Horvitz | Dec 21, 2021 | ||
Page 275 4th line |
weaponKey has no type, s/b "char" |
david | Dec 21, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 289 Last but one bullet point |
The last but one bullet point mentions that "Always use a subclass reference in place of base class.". The wording should be "You can always use a subclass reference in place of base class.". Note from the Author or Editor: |
Anonymous | Feb 16, 2021 | |
Page 290 bottom section |
Console.Write(tweety.Eat()); |
david | Dec 21, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 317 Queen class model |
The Queen class model on page 317 doesn't include a method for AddWorker, UpdateStatusReport or WorkerStatus. Note from the Author or Editor: |
Amy Jenkins | Mar 30, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 320-321 Multiple locations |
There were a few uncorrected typos in the instructions for the Beehive Management System exercise on pages 320 and 321: |
Andrew Stellman |
Apr 17, 2021 | |
Page 358,359 various |
If I'm not mistaken, there is an error where the interface is referred to as "Idefend" on 358 but "Idefender" on 359 (and thereafter). |
david | Dec 30, 2021 | ||
Page 371-372 Last sentence under "Here's what you need to do" (371), The exercise solution for Queen.cs (372) |
On page 371, the last sentence says, "After you add the interface, you only need to change one line of code in the Bee class and three lines of code in the Queen class", since the third bullet point states to replace any Bee reference with an IWorker reference. I believe this may be incorrect as there are 4 Bee references on Queen.cs which would mean 4 lines of code would need to be modified. Note from the Author or Editor: |
Chris Jackson | May 23, 2021 | ||
Page 376 2nd |
abstract class Canine : Animal Note from the Author or Editor: |
nickfox | Oct 31, 2022 | ||
Page 394 bottom Watch it! |
I think it's a good idea to note that WPF projects and Unity will only use 7.3, so Interface default implementation will not be possible for them. The Bee project will give an error, too, all WPF seem to use .NET Framework which is C# 7.3 Note from the Author or Editor: |
david | Jan 05, 2022 | ||
Printed | Page 406 Second code snippet |
Console.WriteLine(aceOfSpades); // prints Ace of Spades Note from the Author or Editor: |
Anonymous | Feb 28, 2021 | |
Page 416 middle, right column |
the solution for how to do .Contains with an array assigns the value to "isIn" which is a new unspecified variable. It should assign true to foundIt. |
david | Jan 06, 2022 | ||
Page 426 code examples |
The enum for Style from page 417 does not use plural s, but here it says things like "Style.Sneakers" |
david | Jan 10, 2022 | ||
Page 426 code examples |
It's not mentioned here, but this shoe collection initializer will not work with the previously given code, as the Shoe class has private stters for Style and Color and also requires parameters for style and color. Note from the Author or Editor: |
david | Jan 10, 2022 | ||
Page 452 2nd-to-last paragraph |
Change "Go ahead and an" to "Go ahead and". Also in the bottom-right note it looks like it says "Deek 2" instead of "Deck 2". |
Anonymous | Apr 27, 2021 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 502 Step 1 |
Microsoft changed the project name from MSTest (.NET Core) to Unit Test Project after the first printing of the book, updated this step to reflect that change. |
Andrew Stellman |
Apr 18, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 512 Sharpen Your Pencil Solution |
In the suggest solution to the NectarCollector Bee, you left out the override keyword. This hides the property, not overrides it. Note from the Author or Editor: |
Jim Cupec | Mar 24, 2021 | |
Page 526 4th bullet point |
"The internal keyword makes classes in one project accessible to another project in a multiproject build" -> change "accessible" to "inaccessible" |
Jermaine Martin | Jan 15, 2022 | ||
Page 549 lower right box |
Should be "i > 9" (or i >= 10) instead of "i > 10" in the for loop to create a deck with 10 cards. Index of deck starts at 0. |
Jermaine Martin | Feb 09, 2022 | ||
Page 556 Bottom of page |
The graph diagram at the bottom of the page, the Guy objects hair colour are the wrong way round. Joe should be Gray and Bob should be Red. |
Anonymous | Jan 25, 2022 | ||
Page 605 Codeblock beneath first paragraph |
The method 'FeedDog' assigns the return value of the method 'Eat' to the variable 'eaten'. That's not possible -> The method 'Eat' does not return a value. |
Jermaine Martin | Apr 27, 2022 | ||
Page 607 Codeblock |
class Guy's ToString method does not fit the console output. |
Jermaine Martin | Apr 27, 2022 | ||
Page 616 above "Sharpen your pencil" solution |
It says: |
Jermaine Martin | Apr 28, 2022 | ||
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 662 Bottom of page where we recommend C# 8.0 in a Nutshell |
"C# 9.0 in a Nutshell" is now out! Update the image of the book cover to match the new edition, and modify the lower right annotation to change "8.0" to "9.0". |
Andrew Stellman |
Mar 13, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 679 Paragraph text of step 4 |
Change this text: |
Andrew Stellman |
Feb 20, 2021 | |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 695 Text under Step 5 |
These changes update the debugging in the Visual Studio for Mac appendix to make it easier for the reader to use. |
Andrew Stellman |
Dec 17, 2020 | Dec 18, 2020 |
Printed, PDF, ePub, Mobi, , Other Digital Version | Page 712 Middle of text snippet on top half of page |
The quote in the textbox in the middle of the snippet says, "the buttons are…colored differently (that's what btn-secondary does)." I've tried using Chrome and Safari for the Mac and they both appear as a sort of grayscale and all the same color. Note from the Author or Editor: |
Daniel Wilson | Mar 14, 2021 |