title: Implementing Nullable Types in Generic Interface
body: <p>So in a previous question I asked about implementing a generic interface with a public class and bingo, it works. However, one of the types I'm looking to pass in is one of the built in nullable types such as: int, Guid, String, etc.</p>
  
  <p>Here's my Interface:</p>
  
  <pre><code>public interface IOurTemplate&lt;T, U&gt;
      where T : class
      where U : class
  {
      IEnumerable&lt;T&gt; List();
      T Get(U id);
  }
  </code></pre>
  
  <p>So when I implement this like so:</p>
  
  <pre><code>public class TestInterface : IOurTemplate&lt;MyCustomClass, Int32&gt;
  {
      public IEnumerable&lt;MyCustomClass&gt; List()
      {
          throw new NotImplementedException();
      }
  
      public MyCustomClass Get(Int32 testID)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>I receive the error message: <em>The type 'int' must be a reference type in order to use it as parameter 'U' in the generic type or method 'TestApp.IOurTemplate'</em></p>
  
  <p>I've tried to infer the type Int32?, but same error. Any ideas?</p>