The PriorityQueue project is the implementation of an priority queue written in c#. As underlieng datastructure you can choose between a list and a heap. For further information please see and the following post at my blog:
That simple example shows how to use the priority queue in list and heap mode.
PriorityQueue<int, string> priorityQueueList = 
    new PriorityQueue<int, string>(PriorityQueueMode.LinkedList);
priorityQueueList.Enqueue(1, "A");
priorityQueueList.Enqueue(2, "B");
var result = priorityQueueList.Dequeue();

PriorityQueue<int, string> priorityQueueHeap =
    new PriorityQueue<int, string>(PriorityQueueMode.BinaryHeap);
priorityQueueHeap.Enqueue(1, "A");
priorityQueueHeap.Enqueue(2, "B");
result = priorityQueueList.Dequeue();

Last edited Sep 17, 2014 at 7:18 PM by netmatze, version 10