C#中的运算符方法的方法名称 [英] Method Names for Operator Methods in C#

查看:80
本文介绍了C#中的运算符方法的方法名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人详尽列出了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'.

非常感谢.

推荐答案

以下是您可以在框架设计准则->操作员超载.

有一个不同的 F#运算符重载列表.

最后,请参考 ECMA-335通用语言 基础结构(CLI) I.10.3运算符重载,其中列出了C ++/CLI的运算符.

Finally, refer to ECMA-335 Common Language Infrastructure (CLI) I.10.3 Operator overloading, where the operators for C++/CLI are listed.

这篇关于C#中的运算符方法的方法名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆