C# Operator is the special symbol that specifies which operations to perform on operands. C# has many operators that have different meanings based on the data types of the operands. C# operators usually have one or two operands. Operators that have one operand are called Unary operators. Operators that have two operand are called Binary operators.
S.No | Lists | Operators |
---|---|---|
Arithmetic Operators | + , - , / , * | |
Relational Operators | ==, <, >, >=, <=, != | |
Modulas Operator | % | |
Logical Operators | &&, ||, ! | |
Increment / Decrement Operators | a++, ++a, a--, --a | |
Conditional or Ternary Operator | ?: | |
Assignment Operator | =, +=, -=, *=, /=, %= | |
Bitwise Operators | &, |, >>, << | |
Sizeof() operator | calculate the size of the data type |