6
Shouts

The theory behind covariance and contravariance in C# 4

published 328 days, 13 hours, 22 minutes ago posted by http://tomaspetricek.pip.verisignlabs.com/http://tomaspetricek.pip.verisignlabs.com/ 338 days, 4 hours, 41 minutes ago
Friday, June 29, 2012 3:52:43 PM GMT Wednesday, June 20, 2012 12:33:39 AM GMT

Covariance and contravariance are two useful features of generics in C# 4.0. Most of the time you don't see them. They just let you write code that you'd expect to work. Actually understanding how they work is more difficult. In this article, I explain that, together with some theory where the two concepts come from.

category: How To | clicked: 54 | | source: tomasp.net | show counter code