It seems the information deluge has started, and the first piece of good news about C# 4.0 is the introduction of contravariance and covariance for delegates and interfaces.

Charlie Calvert has a useful summary that I’d suggest you read.

On first glance, it looks as though the support hinges on adding a in and out modifiers to type parameters as hints for further use.

I’d like to know if the compiler will be doing any checking/enforcing in this area - are the in and out modifiers just hints, or will the compiler be doing some semantic checking to enforce the rules.

Comments

blog comments powered by Disqus
Next Post
Linq Aggregates  30 Oct 2008
Prior Post
The right knowledge for each problem ...  25 Oct 2008
Related Posts
Queue Testing  08 Dec 2018
Creating Branching Nodes  01 Dec 2018
Two Dual Item Queues  24 Nov 2018
Simple Queues  17 Nov 2018
Enqueuing Values  10 Nov 2018
Dequeuing Values  03 Nov 2018
Designing the External API  27 Oct 2018
Introducing the Priority Queue  20 Oct 2018
A better approach to reflection  13 Oct 2018
Avoiding Magic Strings  06 Oct 2018
More csharp posts »
Archives
October 2008
2008