title: How to cast to generic type at runtime if <T> is not available
body: <p>I have the following code</p>
  
  <pre><code>var type = Type.GetType(BrowseDialogName);
  var browseForm = Activator.CreateInstance(type) as MyBrowseForm&lt;SPORTS&gt;;
  </code></pre>
  
  <p>I'm using entity framework and SPORTS is the name of the poco class</p>
  
  <p>my problem here is that this code is inside a custom textbox that has a button and I'm not able to get <code>&lt;T&gt;</code> , at runtime I have the name of the poco class.</p>
  
  <p>so I was wondering if I could do the casting at runtime.</p>
  
  <p>any help or guide is very appreciated</p>