C# ++ Operator
amiedd
3,763 views
C# ++ Operator
www.amiedd.com Amiedd - Code, Cosplay and Games
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// {
using System;
class Hello
{
static void Main()
{
// }
double d = 1.5;
Console.WriteLine(d); // output: 1.5
Console.WriteLine(++d); // output: 2.5
Console.WriteLine(d); // output: 2.5
// {
}
}
// }
Prefix increment operator
If you want a more complex example (external libraries, viewers...), use the Advanced C# template
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.