title: C# variance problem: Assigning List<Derived> as List<Base>
body: <p>Look at the following example (partially taken from <a href="http://blogs.msdn.com/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx" rel="noreferrer">MSDN Blog</a>):</p>
  
  <pre><code>class Animal { }
  class Giraffe : Animal { }
  
  static void Main(string[] args)
  {
      // Array assignment works, but...
      Animal[] animals = new Giraffe[10]; 
  
      // implicit...
      List&lt;Animal&gt; animalsList = new List&lt;Giraffe&gt;();
  
      // ...and explicit casting fails
      List&lt;Animal&gt; animalsList2 = (List&lt;Animal&gt;) new List&lt;Giraffe&gt;();
  }
  </code></pre>
  
  <p>Is this a covariance problem? Will this be supported in the future C# release and are there any clever workarounds (using only .NET 2.0)?</p>