C# in Depth

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

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

Chapter 2: Core foundations: building on C# 1: P57

Created: 5/7/2008
Last updated: 5/7/2008
Severity: Language improvement

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.