How to implement less and greater than in C# generic container?
<p>In C++, with priority queue I can say:</p>

<pre><code>priority_queue&lt;int, vector&lt;int&gt;, greater&lt;int&gt;&gt; min_pq;
priority_queue&lt;int, vector&lt;int&gt;, less&lt;int&gt;&gt; max_pq;
</code></pre>

<p>I wonder is there an equivalent way to do it in C# container? I'm implementing a priority queue, where I need a way to specify this behavior when the user use its constructor. I could use  a <code>boolean</code> flag, but it just doesn't look right to me. Any idea?</p>

<pre><code>public class PriorityQueue&lt;T&gt; where T : IComparable&lt;T&gt; {
     private List&lt;T&gt; data;

     /// &lt;summary&gt;
     /// 
     /// &lt;/summary&gt;
     /// &lt;param name="item"&gt;&lt;/param&gt;
     public void Push(T item) {

     }

     /// &lt;summary&gt;
     /// 
     /// &lt;/summary&gt;
     public void Pop() {

     } 
}
</code></pre>
