title: c# windows forms create generic form
body: <p><strong>I am trying to create a generic user control that inherits parent that also generic.
  <em>something like this</em>:-</strong> </p>
  
  <pre><code>public partial class UserControlBase&lt;T&gt; : UserControl { }
  public partial class UCParent&lt;T&gt; : UserControlBase&lt;T&gt; { }
  public partial class AnalysisUC&lt;T&gt; : UCParent&lt;T&gt; { }
  </code></pre>
  
  <p><strong>the UCParent &amp; AnalysisUC designers  not works fine. get this error</strong></p>
  
  <blockquote>
    <p>Cannot create an instance of
    AnalysisSys.UI.infrastructure.UCParent`1[T] because
    Type.ContainsGenericParameters is true.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/7CFnO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7CFnO.png" alt="enter image description here"></a></p>
  
  <p><em>thanks a lot for your help.</em></p>