title: How do I create a generic class from a string in C#?
body: <p>I have a Generic class like that :</p>
  
  <pre><code>public class Repository&lt;T&gt; {...}
  </code></pre>
  
  <p>And I need to instance that with a string ...
  Example :</p>
  
  <pre><code>string _sample = "TypeRepository";
  var _rep = new Repository&lt;sample&gt;();
  </code></pre>
  
  <p>How can I do that? Is that even possible?</p>
  
  <p>Thanks!</p>