C# ++ Operator


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
// {...}

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