CHASH Tutorial



C# OPERATORS


C# Operators — Complete Guide

Operators are special symbols that perform operations on variables and values. In C#, operators are categorized by their purpose. This tutorial covers all main operators with examples and interactive demos.

1. Arithmetic Operators

Used for basic math operations.

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

2. Assignment Operators

Used to assign values.

  • = Assign
  • += Add and assign
  • -= Subtract and assign
  • *= Multiply and assign
  • /= Divide and assign
  • %= Modulus and assign

3. Comparison Operators

Compare two values, returning a boolean (true or false).

  • == Equal to
  • != Not equal to
  • > Greater than
  • < Less than
  • >= Greater than or equal to
  • <= Less than or equal to

4. Logical Operators

Used to combine or invert boolean expressions.

  • && Logical AND
  • || Logical OR
  • ! Logical NOT

5. Increment and Decrement Operators

Increase or decrease a value by 1.

  • ++ Increment by 1
  • -- Decrement by 1

Try All Operators Yourself

Change the values of a and b, then click Run to see how each operator works.




🌟 Enjoyed Learning with Us?

Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!

Leave a Google Review