title: A generic method can use contravariant/covariant types?
body: <p>I'm writting a generalized method to use it in a special task at a T4 template. The method should allow me to use specialized types from a general interface. I thought about the following signatures:</p>
  
  <pre><code>interface IGreatInterface {
      Object aMethodAlpha&lt;U&gt;(U parameter) where U : IAnInterface;
      Object aMethodBeta(IAnInterface parameter)
  }
  
  public class AnInterestingClass : IAnInterface{}
  </code></pre>
  
  <p>When I try to implement <code>IGreatInterface</code> the compiler flags an error for <code>aMethodBeta()</code> because I've made my T4 to write that method using a subtype of <code>IAnInterface</code> (i.e. I want to implement that method like this: <code>Object aMethodBeta(AnInterestingClass parameter)</code>).</p>
  
  <p>Method <code>aMethodAlpha&lt;U&gt;()</code> can be used but is not as clean as I want because my T4 has to generate some extra code. I (perhaps wrongly) 
  propose that an implementation of that method, which has to be done by a T4, could be<br>
  <code>Object aMethodAlpha&lt;AnInterestingClass&gt;(AnInterestingClass  parameter)</code>.</p>
  
  <p>I'm thinking that generic methods do not support contravariant types but I'm not sure; I suppose that It's the way the compiler prevents the coder to use a specific type having a method not defined in the general type...</p>
  
  <ol>
  <li>Does a generic method have to use the exact type when being implemented? </li>
  <li>Is there any trick to change this behavior?</li>
  </ol>