title: Why can't I cast a generic type to a value type
body: <p>This may be a basic question but why can't I cast a generic type back to it's original type when passing a list of value types into a generic method ?</p>
  
  <pre><code>IList&lt;int&gt; list = new List&lt;int&gt;() { 1, 2, 3, 4, 5, 6, 7, 8 };
  Inverse&lt;int&gt;(list);
  
    public void Inverse&lt;T&gt;(IList&lt;T&gt; list)
          {
              for (i = 0; i &lt;= list.Count / 2; i++)
              {
                  int a = list[i] as Int16; //=&gt; does not work
                  int b = (int)list[i]; //=&gt; does not work either
  
              }
           }
  </code></pre>