问题描述
是否有人详尽列出了C#/CLR提供给操作员的名称? (也许我的睡眠不足正在加剧,但我似乎无法在Google上找到它) op_Addition,op_Subtraction.此外,这些机会是否有可能在其他文化中有所不同?
Does anyone have a exhaustive list of the names that C#/CLR gives to operators? (Maybe my lack of sleep is kicking in, but I can't seem to find it on Google) E.g. op_Addition, op_Subtraction. Furthermore is there any chance that these would be different in other cultures?
我正在尝试创建一个可以加减两个对象的类,并且我已经完成了所有原语-我只需要做'rest'.
I am trying to create a class that can add/subtract etc. two objects and I have done all the primitives - I just need to do the 'rest'.
非常感谢.
推荐答案
以下是 C#可重载运算符
您可以在框架设计准则->操作员超载.
有一个不同的 F#运算符重载列表.
最后,请参考 ECMA-335通用语言基础结构(CLI) I.10.3运算符重载,其中列出了C ++/CLI的运算符.
Finally, refer to ECMA-335 Common LanguageInfrastructure (CLI) I.10.3 Operator overloading, where the operators for C++/CLI are listed.
这篇关于C#中的运算符方法的方法名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!