title: Generic type constraint for interface?
body: <p>I can do this:</p>
  
  <pre><code>void MyMethod&lt;T&gt;() where T : class { }
  </code></pre>
  
  <p>Is there anything like this?</p>
  
  <pre><code>void MyMethod&lt;T&gt;() where T : interface { }
  </code></pre>
  
  <p>I'd prefer not to specify the interface name explicitly.  </p>
  
  <p>The alternative is that I can pass in an argument that's constrained by <code>class</code> and throw an exception if <code>typeof(T).IsInterface</code> returns false, but that's not as clean as a constraint.</p>