title: Initialize generic object from a System.Type
body: <p>I need to create a generic type, but I do not know the type at compile time. I would like to do this:</p>
  
  <pre><code>Type t = typeof(whatever);
  var list = new List&lt;t&gt;
  </code></pre>
  
  <p>this won't compile, because t is not a valid type. But it does know all about a valid type. Is there a way to dynamically create the generic list from a System.Type like this? I may need reflection, and that's ok, I am just a bit lost here.</p>