这些(+ =,-=,* =,/=)运算符是什么意思? [英] What do these ( += , -= , *= , /= ) Operators Mean?
本文介绍了这些(+ =,-=,* =,/=)运算符是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直到处寻找这些含义以及它们的用法+=
,-=
,*=
,/=
,我发现的最多就是它们,加法分配" ,按差异分配",按产品分配",按商分配"等,但我不知道何时或如何使用它们.如果有人可以向我解释这一点,我将不胜感激.谢谢
I have been looking everywhere to figure out what these mean and how they are used +=
, -=
, *=
, /=
, the most I have found is that they are, "Assignment by Addition", "Assignment by Difference", "Assignment by Product", "Assignment by Quotient", etc, but I can't figure out when or how they are used. If anyone can please explain this to me I would be very grateful. thanks
推荐答案
它们是简写形式:
a += b
与
a = a + b
等等...
如此
-
a -= b
等同于a = a - b
-
a *= b
等同于a = a * b
-
a /= b
等同于a = a / b
a -= b
is equivalent toa = a - b
a *= b
is equivalent toa = a * b
a /= b
is equivalent toa = a / b
As Kevin Brydon suggested - Familiarize yourself with the operators in C# here.
这篇关于这些(+ =,-=,* =,/=)运算符是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文