C# String Operator Overloading

前端 未结 7 2002
自闭症患者
自闭症患者 2020-12-19 04:02

G\'Day Mates -

What is the right way (excluding the argument of whether it is advisable) to overload the string operators <, >, <= and >= ?

I\'ve trie

相关标签:
7条回答
  • 2020-12-19 04:47

    The simple answer is that you can't; there's no way to modify the operators for another class. Partial classes are only allowed for classes that are both declared partial in all files and defined in the same assembly.

    0 讨论(0)
提交回复
热议问题