mpe*_*pen 53 c# generics .net-4.0
是否有可能做类似的事情
public class PriorityQueue<TValue, TPriority=int> where TPriority : IComparable
(注意=int)?
在你建议之前,是的,我知道我可以添加另一行:
public class PriorityQueue<TValue> : PriorityQueue<TValue, int> { }
但我想知道是否有可能将它作为一个参数.
| 归档时间: | 
 | 
| 查看次数: | 21068 次 | 
| 最近记录: |