(You are currently looking at the third edition version of this page. This page is also available for the first and second editions.)

Errata for Chapter 2: Core foundations: building on C# 1

P33, figure 2.2: Incorrect figure included (again)

This problem has been fixed. Please download the latest version of the ebook if you see this issue in your version.

Just like in the second edition, figure 2.2 in the ebook is the wrong figure.

Figure 13.1 has accidentally been included again as figure 2.2. The real figure 2.2 should look like this:

Figure 2.2 - delegate combination

P53, listing 2.6: Just how old are you, Jon?

Eagle-eyed readers may have noticed that in listing 2.6, I claim to be 31 years old, whereas in later listings throughout the book I'm 36 or 37. Sad to say, it's the latter age which was correct as the third edition went to print - I was born in June 1976. These days I can barely remember what it was like to be 31.

In fact, this was a problem in the second edition as well. It seems that chapter 2 is a chapter of eternal youth, basically. All the code works - it's just the data is inconsistent between listings.

This actually raises an interesting point about storing time-sensitive data: always try to store a fixed reference point rather than a dynamic value. If I'd had a DateOfBirth property instead of an Age property, nothing would have needed updating between editions at all. That's what I'd have done for real code, but Age = 37 is a good deal shorter than DateOfBirth = new DateTime(1976, 6, 19) even leaving aside the thorny issue of how suitable DateTime is for storing a date.