title: The type must be a reference type in order to use it as parameter 'T' in the generic type or method
body: <p>I'm getting deeper into generics and now have a situation I need help with. I get a compile error on the 'Derived' class below as shown in the subject title. I see many other posts similar to this one but I'm not seeing the relationship. Can someone tell me how to resolve this?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  
  namespace Example
  {
      public class ViewContext
      {
          ViewContext() { }
      }
  
      public interface IModel
      {
      }
  
      public interface IView&lt;T&gt; where T : IModel 
      {
          ViewContext ViewContext { get; set; }
      }
  
      public class SomeModel : IModel
      {
          public SomeModel() { }
          public int ID { get; set; }
      }
  
      public class Base&lt;T&gt; where T : IModel
      {
  
          public Base(IView&lt;T&gt; view)
          {
          }
      }
  
      public class Derived&lt;SomeModel&gt; : Base&lt;SomeModel&gt; where SomeModel : IModel
      {
  
          public Derived(IView&lt;SomeModel&gt; view)
              : base(view)
          {
              SomeModel m = (SomeModel)Activator.CreateInstance(typeof(SomeModel));
              Service&lt;SomeModel&gt; s = new Service&lt;SomeModel&gt;();
              s.Work(m);
          }
      }
  
      public class Service&lt;SomeModel&gt; where SomeModel : IModel
      {
          public Service()
          {
          }
  
          public void Work(SomeModel m)
          {
  
          }
      }
  }
  </code></pre>