title: List of abstract class
body: <p>I have abstract class:</p>
  
  <pre><code>public abstract class MyClass
  {
      public abstract string nazwa
      {
          get;
      }
  }
  </code></pre>
  
  <p>And two classes which inherit from MyClass:</p>
  
  <pre><code>public class MyClass1 : MyClass
  {
      public override string nazwa
      {
          get { return "aaa"; }
      }
  }
  
  public class MyClass2 : MyClass
  {
      public override string nazwa
      {
          get { return "bbb"; }
      }
  }
  </code></pre>
  
  <p>In another class I create List:</p>
  
  <pre><code>List&lt;MyClass&gt; myList;
  </code></pre>
  
  <p>Now I want to create</p>
  
  <pre><code>myList = new List&lt;MyClass1&gt;;
  </code></pre>
  
  <p>The compiler show an error:</p>
  
  <pre><code>Cannot implicitly convert type 'System.Collections.Generic.List&lt;Program.MyClass1&gt;' to 'System.Collections.Generic.List&lt;Program.MyClass&gt;'
  </code></pre>
  
  <p>I must be some easy way to convert it... I cannot find anything useful</p>