The Assignment Operator : Assignment Operator « Operator « C# / CSharp Tutorial






It has this general form:

var = expression;

The general form of the shorthand is

var op = expression;

Thus, the arithmetic and logical assignment operators are

  1. +=
  2. -=
  3. *=
  4. /=
  5. %=
  6. &=
  7. |=
  8. ^=








3.1.Assignment Operator
3.1.1.The Assignment Operator
3.1.2.Full list of shortcut assignment operators available in C#.
3.1.3.Operator list
3.1.4.List of Compound Operators