++x和x++

class MainClass
{
    static void Main()
    {
        double x;

        x = 1.5;
        Console.WriteLine(++x);
        Console.WriteLine(x);

        x = 1.5;
        Console.WriteLine(x++);
        Console.WriteLine(x);
    }
}

结果值为:
2.5
2.5


1.5
2.5

原文地址:https://www.cnblogs.com/mrhgw/p/1979796.html