C# in Depth

Cover of C# in Depth
Order now (3rd edition)

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

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

P 45, bottom line: Font fail

On page 45, on the bottom line, strings and objects should both be in the code font:

both strings and objects refer to the same array.

Currently the 's' at the end of each word is in the normal font. Oops.

P50, Figure 2.3: Incorrect label for bottom right box of figure 2.3

On the right hand side of figure 2.3 ("When Point is a value type") the bottom box should be labeled p2 instead of p1.

I have produced a corrected PDF of the figure.

Thanks to David Gadd for spotting this and pointing it out.

P57: Covariance/contravariance - just what isn't improved in C# 2?

In the first edition, lines 3-5 of page 57 read:

C# 2 doesn't tackle the general issue of covariant return types and covariant parameters, but it does cover it for creating delegate instances in certain situations, as we saw in section 2.4.1.

It's not terribly clear what the "general issue" is. The following would be clearer:

C# 2 doesn't tackle the issue of return type covariance and parameter contravariance for overriding members or implementing interfaces. However, it does improve the situation for delegate instance creation in certain situations, as we saw in section 2.4.1.