I'm trying to make a custom Comparer for a priority queue and I am
stumped on the syntax for the Generics. I think I almost have it
(below) except for where the ??'s are. Anybody done this before?
Thanks,
Bill
struct Item<TValue, TPriority{ }
class MyComparer<T??: IComparer<Item<V,P>
where T : IComparable<Item<V, P>{
public int Compare(Item<V, Pobj1, Item<V, Pobj2) {
}
public class Queue<TValue, TPriority:
IEnumerable<Item<TValue, TPriority>>, ICloneable {
protected IComparer<Item<TValue, TPriority>>
specialComparer = new MyComparer<Item<TValue,
TPriority>>();
....
....
}