Learn about operators in C# with examples and simple explanations with code.
What is operators in C#?
Operators are special symbols that are used to perform operations on one or more operands in C# programming. Generally, these operators are applied on primitive data types in C# e.g. int, float and double etc.
Operands example – In an arithmetic expression 2+3 =5, 2 and 3 are operands and + is a symbol for addition operator.
Operators in C#
Below are the operators available in C# programming.
- Assignment operators
- Relational operators
- Arithmetic operators
- Logical Operators
- Unary operators
- Ternary operator