Back to course

Arithmetic and Assignment Operators

C# Zero to Hero: Comprehensive Programming Masterclass

Operators in C#

Operators are symbols used to perform operations on variables and values.

Arithmetic Operators

  • + (Addition)
  • - (Subtraction)
  • * (Multiplication)
  • / (Division)
  • % (Modulus - remainder of division)

Increment / Decrement

  • ++ (Increases value by 1)
  • -- (Decreases value by 1)

Assignment

  • = (Assign)
  • += (Add and assign: x += 5 is x = x + 5)