如果我想要一个只接受重载运算符的类型的泛型方法,例如减法运算符,我该怎么办?我尝试使用接口作为约束,但接口不能有运算符重载.
实现这一目标的最佳方法是什么?
c# generics constraints operator-overloading
c# ×1
constraints ×1
generics ×1
operator-overloading ×1