<p>Can someone explain why there is the need to add an out or in parameter to indicate that a generic type is Co or Contra variant in C# 4.0?</p>

<p>I've been trying to understand why this is important and why the compiler can't just figure it out..</p>

<p>Thanks,</p>

<p>Josh</p>

The
```
in
```
and
```
out
```
keywords have been keywords since C# 1.0, and have been used in the context of
```
in
```
- and
```
out
```
- parameters to methods.
Covariance and contravariance are constraints on how one can implement an interface. There is no good way to infer them - the only way, I think, is from usage, and that would be messy and in the end it wouldn't work.