title: Can I dictate that a C# type parameter must only be an interface type?
body: <p>I would like to implement a generic C# class which looks roughly as follows:</p>
  
  <pre><code>abstract class Foobar&lt;T&gt; : AbstractBase, T
  { ... }
  </code></pre>
  
  <p>This fails because C# will only allow types after the base class to be interfaces, so next I try this:</p>
  
  <pre><code>abstract class Foobar&lt;T&gt; : AbstractBase, T where T : interface
  { ... }
  </code></pre>
  
  <p>But then I find that C# does not allow this form of type constraint.  Only <code>where T : struct</code> and <code>where T : class</code> are allowed.</p>
  
  <p>How can I dictate that a type parameter must only be an interface type?</p>