title: Supporting both covariance and contravariance for a single type parameter
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4528186/covariance-and-contravariance-on-the-same-type-argument">Covariance and Contravariance on the same type argument</a>  </p>
  </blockquote>
  
  
  
  <p>You can declare a generic type parameter as covariant by using the <code>out</code> keyword:</p>
  
  <pre><code>interface ICovariant&lt;out R&gt;
  </code></pre>
  
  <p>You can declare a generic type parameter as contravariant by using the <code>in</code> keyword:</p>
  
  <pre><code>interface IContravariant&lt;in R&gt;
  </code></pre>
  
  <p>And you can also support both for different type parameters:</p>
  
  <pre><code>interface IVariant&lt;out R, in A&gt;
  </code></pre>
  
  <p>So why can't you suport both for a single type parameter?</p>