title: It's possible pass subclass of superclass in <T>?
body: <p>I have a class named GenericDao</p>
  
  <pre><code>internal class GenericDao&lt;T&gt; : IGenericDao&lt;T&gt; {
  }
  </code></pre>
  
  <p>The two class of objects:</p>
  
  <pre><code>public class Empresa {
  }
  
  public class Assessoria : Empresa {
  }
  </code></pre>
  
  <p>And i have one EmpresaDao:</p>
  
  <pre><code>public class EmpresaDao {
  
      private GenericDao&lt;Empresa&gt; parent { get; set; }
  
      public EmpresaDao() {
          this.parent = new GenericDao&lt;Empresa&gt;();
      }
  }
  </code></pre>
  
  <p>How to instantiate the GenericDao using the subclass Assessoria? I do something like this, but not work:</p>
  
  <pre><code>public class EmpresaDao {
  
      private GenericDao&lt;Empresa&gt; parent { get; set; }
  
      public EmpresaDao(Type type) {
          if (type == typeof(Assessoria)) {
              this.parent = new GenericDao&lt;Assessoria&gt;();
          } else {
              this.parent = new GenericDao&lt;Empresa&gt;();
          }
      }
  }
  </code></pre>