title: Generate a generic list of some given type
body: <p>My friend is trying to create a utility function that is given some <code>Type</code> and in that function it creates a generic List of that type. We're having trouble creating that list:</p>
  
  <pre><code>public static List&lt;T&gt; GetQueryResult(string xpathQuery, Type itemType) {
  
    // this line does not work:
    List&lt;itemType&gt; lst = new List&lt;itemType&gt;();
  
    return lst;
  }
  </code></pre>
  
  <p>Are there any easy solutions to this?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Is there any way to basically do this???</p>
  
  <pre><code>List&lt;T&gt; lst = new List&lt;T&gt;(); 
  foreach (Sitecore.Data.Items.Item i in items) { 
    lst.Add(new T(i)); 
  }
  </code></pre>