title: Why can't I use System.ValueType as a generics constraint?
body: <ul>
  <li>Why can't I use a constraint of
  <code>where T : System.ValueType</code>?  </li>
  <li>Why does Microsoft prevent this type
  from being a constraint?</li>
  </ul>
  
  <hr>
  
  <p><strong>Example:</strong></p>
  
  <p>Why can't I do the following?</p>
  
  <pre><code>// Defined in a .Net class
  public void bar&lt;T&gt;(T a) where T : ValueType {...}
  
  // Defined in my class
  public void foo&lt;T&gt;(T a) where T : ValueType 
  { bar&lt;T&gt;(a); }
  </code></pre>
  
  <p>What is the difference in using struct over ValueType?</p>
  
  <pre><code>// Defined in my class
  public void foo&lt;T&gt;(T a) where T : struct 
  { bar&lt;T&gt;(a); }
  </code></pre>