title: How to define generic type limit to primitive types?
body: <p>I have the following method with generic type:</p>
  
  <pre><code>T GetValue&lt;T&gt;();
  </code></pre>
  
  <p>I would like to limit T to primitive types such as int, string, float but not class type. I know I can define generic for class type like this:</p>
  
  <pre><code>C GetObject&lt;C&gt;() where C: class;
  </code></pre>
  
  <p>I am not sure if it is possible for primitive types and how if so.</p>