constraining a generic type at absract class level or interface level

前端 未结 0 1121
鱼传尺愫
鱼传尺愫 2021-02-19 01:55

I want to restrict a generic type to be of particular type. In this case, i want the generic type T to be of something that is IComparable. And i want the restriction to happen

相关标签:
回答
  • 消灭零回复
提交回复
热议问题