title: Parametric polymorphism in c#?
body: <p>I am trying to create a parametric polmorphism function in c#:</p>
  
  <p>I want to have <code>T</code> be the type variable. But I am getting error about class <code>T</code> is not found.</p>
  
  <p>Does anyone know how to fix this?</p>
  
  <p>Thanks.</p>
  
  <pre><code>    public List&lt;T&gt; getX(SPListItemCollection itemCollection, List&lt;T&gt; itemList, Report RO, WebpartSettings WPS)
      {
          foreach (T item in itemCollection)
          {
              if (have_permissions_for_item(WPS.EDIT_MODE, item, RO))
              {
                  itemList.Add(item);
              }
          }
          return itemList;
      }
  </code></pre>