title: c# class implements and inherits at the same time
body: <p>I want to declare a class that inherits a generic class and implements an interface, such as the following:</p>
  
  <pre><code>public class SortableObject
  {
      int compare(SortableObejct obj);
  }
  
  public class List&lt;T&gt; where T is class
  {
      public void add(T obj);
      public T peekCurrent();
  }
  
  public class SortedList&lt;T&gt; : List&lt;T&gt; where T : SortableObject, SortableObject
  {
      public override int compare(SortableObejct obj);
  }
  </code></pre>
  
  <p>I want <code>SortedList&lt;T&gt;</code> inherits from <code>List&lt;T&gt;</code> and implements from <code>SortableObject</code>, where <code>T</code> is a subclass from <code>SortableObject</code>. The c# compiler fails to compile such class; it seems to me that the grammar does not support this case.</p>
  
  <p>Would anyone have met such difficulty and have a solution for it ?</p>