Back to course

Arithmetic and Assignment Operators

.NET Zero to Hero: Master C# and Modern App Development

Math in C#

Arithmetic Operators:

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

Assignment Operators:

  • = Assign
  • += Add and assign (e.g., x += 5 is x = x + 5)
  • -= Subtract and assign

Increment/Decrement:

  • x++ (Increase by 1)
  • x-- (Decrease by 1)