Initializes a new instance of the PriorityQueue
class that is empty, has the default initial capacity, and is sorted according to the default Comparer for the type of the data.
public PriorityQueue()
Initializes a new instance of the PriorityQueue
class that is empty, has the default initial capacity, and is sorted according to the specified IComparer.
public PriorityQueue(IComparer<T>? comparer)
parameter | description |
---|---|
comparer | The IComparer implementation to use when comparing items. -or- a null reference to use the default Comparer for the type of the data. |
Initializes a new instance of the PriorityQueue
class that is empty, has the specified initial capacity, and is sorted according to the default Comparer for the type of the data.
public PriorityQueue(int capacity)
parameter | description |
---|---|
capacity | The initial capacity. |
Initializes a new instance of the PriorityQueue
class that is empty, has the specified initial capacity, and is sorted according to the specified IComparer.
public PriorityQueue(int capacity, IComparer<T>? comparer)
parameter | description |
---|---|
capacity | The initial capacity. |
comparer | The IComparer implementation to use when comparing items. -or- a null reference to use the default Comparer for the type of the data. |