Home » C# Basics » 03 - C# Programming - Part 1
3
Increment and decrement operators
Explains what increment and decrement operators are and how it functions in a C# program
In C#, there are two operators used for increasing or decreasing the value of a variable by 1. The increment operator is denoted by "++" and the decrement operator is denoted by "--".
For example, consider the following code:
int num; num=10; num++;
After the last statement, the value of `num' is 11. Similarly,
int num; num=10; num--;
The last statement will decrease the value of `num' by 1 and make it 9.