Covariance and Contravariance in .NET 4.0
- Posted: Mar 17, 2010 at 4:17 AM
- 7,139 Views
Right click “Save as…”
.NET 4 introduces covariance and contravariance in generic interfaces and delegates. Covariance is the ability to use a more derived type than originally specified and will enable you to pass a IEnumerable<T2> as a IEnumerable<T1> if T2 derives from T1.
This webcast walks through some of the variant generic interfaces, show how you can define your own covariant generic interface and also introduce you to variance in generic delegates.
http://twitter.com/CompositeC1
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?