Understanding Covariant and Contravariant interfaces in C#

Posted by SLC on Stack Overflow See other posts from Stack Overflow or by SLC
Published on 2010-04-27T09:13:24Z Indexed on 2010/04/27 9:23 UTC
Read the original article Hit count: 214

I've come across these in a textbook I am reading on C#, but I am having difficulty understanding them, probably due to lack of context.

Is there a good concise explanation of what they are and what they are useful for out there?

Edit for clarification:

Covariant interface:

interface IBibble<out T>
.
.

Contravariant interface:

interface IBibble<in T>
.
.

© Stack Overflow or respective owner

Related posts about covariance

Related posts about contravariance