title: How to get base class's generic type parameter?
body: <p>I have three class as following:</p>
  
  <pre><code>public class TestEntity { }
  
  public class BaseClass&lt;TEntity&gt; { }
  
  public class DerivedClass : BaseClass&lt;TestEntity&gt; { }
  </code></pre>
  
  <p>I already get the <code>System.Type</code> object of <code>DerivedClass</code> using reflection in runtime. How can I get the <code>System.Type</code> object of <code>TestEntity</code> using reflection?</p>
  
  <p>Thanks.</p>