总结:
i++ 先用后加,
++i先加后用;
i--先用后减,
--i先减后用;
//int i = 1; //Console.WriteLine(i);//1 //Console.WriteLine("i++={0}", i++); //1 //Console.WriteLine(i);//2 //int j = 1; //Console.WriteLine(j);//1 //Console.WriteLine("++j={0}", ++j); //2 //Console.WriteLine(j);//2 int i = 1; Console.WriteLine(i);//1 Console.WriteLine("i--={0}", i--); //1 Console.WriteLine(i);//0 int j = 1; Console.WriteLine(j);//1 Console.WriteLine("--j={0}", --j); //0 Console.WriteLine(j);//0
//++、--的优先级大于+、- //int k = 1; //int k2 = 1 + --k; //Console.WriteLine(k2);//1 Console.ReadKey();