The C# spec states that an argument type cannot be both covariant and contravariant at the same time.
This is apparent when creating a covariant or contravariant int
Generic type parameters cannot be both covariant and contravariant.
Why? This has to do with the restrictions which in
and out
modifiers impose. If we wanted to make our generic type parameter both covariant and contravariant, we would basically say:
Which would essentially make our generic interface non-generic.
I explained it in detail under another question: