I\'m trying to do this:
interface IA { } class A : IA { } class Foo where T: IA { } class Program { static void Main( string[] args ) {
All generic classes are invariant. Interfaces (and delegates) on the other hand can support co- and contra-variance, but only in the cases where it's possible safely. And they need to opt-in explicitly.
For example via IFoo or IFoo
IFoo