title: Why can't I assign a List<Derived> to a List<Base>?
body: <p>I defined the following class:</p>
  
  <pre><code>public abstract class AbstractPackageCall
      {
  
       ...
  
      }
  </code></pre>
  
  <p>I also define a subclass of this class:</p>
  
  <pre><code>class PackageCall : AbstractPackageCall
      {
  
        ...
      }
  </code></pre>
  
  <p>There are also several other subclases of <code>AbstractPackageCall</code></p>
  
  <p>Now I want to make the following call:</p>
  
  <pre><code> List&lt;AbstractPackageCall&gt; calls = package.getCalls();
  </code></pre>
  
  <p>But I always get this exception:</p>
  
  <pre><code>Error   13  Cannot implicitly convert type 'System.Collections.Generic.List&lt;Prototype_Concept_2.model.PackageCall&gt;' to 'System.Collections.Generic.List&lt;Prototype_Concept_2.model.AbstractPackageCall&gt;' 
  </code></pre>
  
  <p>What is the problem here? This is the method Package#getCalls</p>
  
  <pre><code> internal List&lt;PackageCall&gt; getCalls()
          {
              return calls;
          }
  </code></pre>