title: Explicit generic interface with class inheritance
body: <p><strong>GENERIC INTERFACE</strong>:</p>
  
  <pre><code>interface ICloneable &lt; T &gt;  
  {  
      T CopyFrom (T source);  
      T CopyFrom (T source);  
      T CopyTo (T destination);  
  }
  </code></pre>
  
  <p><strong>CLASS</strong>: Implements generic interface:</p>
  
  <pre><code>public class Entity: ICloneable &lt; Entity &gt;  
  {  
      public int ID { get; set; }  
      public Entity CopyFrom (Entity source)  
      {  
      this.ID = source.ID;  
      return (this);  
      }  
  }
  </code></pre>
  
  <p><strong>WINDOWS FORM</strong>: This form should only accept T types that implement the above generic interface.</p>
  
  <pre><code>public sealed partial class Computer &lt; T &gt;: System.Windows.Forms.Form  
  {  
      private T ObjectCurrent { get; set; }  
      private T ObjectOriginal { get; set; }  
      public Computer (HouseOfSynergy.Library.Interfaces.ICloneable &lt; T &gt; @object)
      {  
          this.ObjectOriginal = (T) @object;  
          this.ObjectCurrent = @object.Clone();  
      }  
      private void buttonOk_Click (object sender, System.EventArgs e)  
      {  
          ((ICloneable &lt; T &gt;) this.ObjectOriginal).CopyFrom(this.ObjectCurrent);  
          this.Close();  
      }  
  }
  </code></pre>
  
  <p>As you would guess, the call to <code>((ICloneable &lt; T &gt;) this.ObjectOriginal).CopyFrom(this.ObjectCurrent);</code> is perfectly legal. However, the code above does not <em>ensure</em> that the type T passed in to the class implements <code>ICloneable &lt; T &gt;</code>. I have forced it through the constructor but that looks to be in bad taste.</p>
  
  <p>The following two constructs are illegal and I wonder why:</p>
  
  <pre><code>class Computer &lt; ICloneable &lt; T &gt;&gt;: System.Windows.Forms.Form
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>class Computer &lt; T where T: ICloneable &lt; T &gt; &gt;: System.Windows.Forms.Form
  </code></pre>
  
  <p>Any thoughts on how to achieve this?</p>