O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Co- and Contravariance

Most of the C# 4.0 language features deal with dynamic typing and simplifying interoperability scenarios, but one other feature did make it in to the language update. Generic co- and contravariance is a powerful feature with a scary name. Luckily, you won’t have to deal with it directly that often. Instead, this new feature makes working with certain generic interfaces and delegates easier. Let’s have a look.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required