This question already has answers here:
Closed 6 years ago.
Is it possible to do something like
public class PriorityQueue<TValue, TPriority=int> where TPriority : IComparable
(note the =int
) ?
Before you suggest it, yes, I know I can just add another line:
public class PriorityQueue<TValue> : PriorityQueue<TValue, int> { }
But I'm wondering if it's possible to do it as a param.