It's dangerous to code alone! Take this.

4.0.5 has Arrived!

Published on 08 Aug 2021.

Version 4.0.5 is going out today. This is another digital-only update, fixing minor typos and a few other tweaks. This is also the smallest update, in terms of total changes, so far, which is a trend I generally expect to continue going forward.

The changes include:

  1. Fixing the title in the headers of Level 53 (said Bonus Level A instead of Into Lands Uncharted as they were supposed to say). Thanks @odigity!
  2. A couple of corrections to the code sample on page 339 about using locks to enforce thread safety. Thanks @Powder!
  3. Added a missing $ to a string interpolation for the code at the very bottom of page 266. Thanks @Powder!
  4. A slight tweak to the Safer Number Crunching challenge on page 267 to indicate using the int.TryParse(string s, out int result) method (as shown earlier in that section) instead of the non-existent int.TryParse(out int value) method (missing the first string parameter). Thanks @Powder and @Kranberry!
  5. An updated version of the XP Tracker on the website to fix some outdated challenge entries. Thanks @AddAmazeing!

I also added two new articles on the website as a part of this update:

  1. Locks and Reading Data: Discusses locks in a bit more depth to cover some ground that the book doesn’t quite capture. Worth a read if you’re doing much with multi-threading and concurrency in C#. This is in response to the deeper analysis I did while fixing #2 above, so thanks again, @Powder!
  2. Lists and InvalidOperationExceptions. The book mentions that you can use foreach on a list, but that if you add, remove, or swap out items in a list while in the middle of a foreach, you’ll get an exception. It then mentions that there are two ways to get around the problem, and describes how you can just use a for loop. But it does not cover the second option. This article covers it. Thanks for asking about it, @JustPlay!