I'm not sure if I should actually be posting the question on this site, but here it goes. I'm reading Essential C# 6.0 and I encountered this paragraph
The result of the prefix operators is the value that the variable had before it was incremented or decremented. The result of the postfix operators is the value that the variable had after it was incremented or decremented.
I think read this at least 10 times but to me it seams to be exactly the opposite of the code below (which is not from the book). Can anyone explain if it's something that I'm getting wrong or is it just a mistake in the book ? I've also checked the errata btw and I couldn't find this there.
using System;
public class Program
{
public static void Main()
{
var a = 23;
var b = 23;
var c = a++; //postfix
var d = ++b; //prefix
Console.WriteLine(c); //23
Console.WriteLine(d); //24
}
}