List of Compound Operators : Assignment Operator « Operator « C# / CSharp Tutorial






Operator                        Symbol                     Sample

Addition Assignment             +=                         variable+=5;

Subtraction Assignment          -=                         variable-=10;

Multiplication Assignment       *=                         variable*=5;

Division Assignment             /=                         variable/=5;

Modulus Assignment              %=                         variable%=3;

And Assignment                  &=                         variable&=3;

Or Assignment                   |=                         variable|=3;

XOR Assignment                  ^=                         variable^= 3;

Left-Shift Assignment           <<=                        variable<<=3;

Right-Shift Assignment          >>=                        variable>>=1








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