title: How do I create a dynamic type List<T>
body: <p>I don't want my List to be of fixed type. Rather I want the creation of List to be dependent on the type of variable. This code doesn't work:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Collections.Generic;
  namespace ConsoleApplication3
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              string something = "Apple";
  
              Type type = something.GetType();
  
              List&lt;type&gt; list = null;
  
              Console.ReadKey();
  
          }
      }
  }
  </code></pre>
  
  <p>Can anybody tell me what changes I need to make in order to make it work right? I want the creation of <code>list</code> to be dependent on the type of variable <code>something</code></p>