This blog defines the Increment and decrement operator in VB.NET.
VB.NET does not support like this ++ and --
VB.NET replaces the i++ to i=+1
VB.NET replaces the i++ to i=-1
For example
Module Module1
Sub Main()
Dim i As Integer
i = 5
Dim j As Integer
i = i + 1
Console.WriteLine(i)
i = i - 1
Console.WriteLine(i)
End Sub
End Module
OUTPUT
The output will be 6,5.
C# supports like this ++ and --
The ++ and the –- are the increment and decrement operators.
Increment(++) operator
The increment operator increases its operand by one.
For example
y=y+1
can be rewritten like this by use for the increment operator.
y++

Join the conversation! Your thoughts help the community grow.