title: C# Priority Queue
body: <p>I'm looking for a priority queue with an interface like this:</p>
  
  <pre><code>class PriorityQueue&lt;T&gt;
  {
      public void Enqueue(T item, int priority)
      {
      }
  
      public T Dequeue()
      {
      }
  }
  </code></pre>
  
  <p>All the implementations I've seen assume that <code>item</code> is an <code>IComparable</code> but I don't like this approach; I want to specify the priority when I'm pushing it onto the queue.</p>
  
  <p>If a ready-made implementation doesn't exist, what's the best way to go about doing this myself? What underlying data structure should I use? Some sort of self-balancing tree, or what? A standard C#.net structure would be nice.</p>