title: How to upcast generic type parameters
body: <p>When I use reflection in this case, the created type can be many generic types.</p>
  
  <pre><code>BaseStepHandler&lt;BaseStepDataModel&gt; activator = (BaseStepHandler&lt;BaseStepDataModel&gt;)Activator.CreateInstance(....);
  </code></pre>
  
  <p>The created instance can be all childs of BaseStepDataModel.</p>
  
  <p><code>BaseStepHandler&lt;OneDataModel&gt;<br>
    OR<br>
   BaseStepHandler&lt;TwoDataModel&gt;</code></p>
  
  <p>OneDataModel and TwoDataModel are extending BaseStepDataModel.      </p>
  
  <p>this is the exception that I get:</p>
  
  <p>Unable to cast object of type '....GlobalOnBoardingStepOneHandler' to type '....BaseStepHandler`1[....BaseStepDataModel]'.</p>
  
  <p>this is the declaration if GlobalOnBoardingStepOneHandler.</p>
  
  <pre><code>public class GlobalOnBoardingStepOneHandler : BaseStepHandler&lt;GlobalOnBoardingStepOneDataModel&gt;{}
  </code></pre>