C# ++ Operator

amiedd
1,306 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

C# ++ Operator

www.amiedd.com Amiedd - Code, Cosplay and Games

// {...}
double d = 1.5;
Console.WriteLine(d); // output: 1.5
Console.WriteLine(++d); // output: 2.5
Console.WriteLine(d); // output: 2.5
// {...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Prefix increment operator

If you want a more complex example (external libraries, viewers...), use the Advanced C# template

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content