What's the best way to force my container class to only accept objects that implement IComparable?
<p>I am learning C#.  Doing the below exercises to make use of features.</p>

<p>I have this class acting as my container:</p>

<pre><code>class myContainer&lt;T&gt; : List&lt;T&gt;
</code></pre>

<p>When I add this struct to the container it works fine because it has an implementation of IComparable</p>

<pre><code>interface bla&lt;T&gt; : IComparable&lt;T&gt; {}
struct IString : bla&lt;IString&gt;
</code></pre>

<p>When I add a class that has not implemented IComparable through an interface or directly, I get an error at runtime if I do something like Sort()</p>

<p>What's the best way to force my container class to only accept objects that implement IComparable ?</p>

<p>thanks</p>
