using System; public class Test { public static void Main() { int x, y = 5; // y = 5; Console.WriteLine(y); x = ++y * 2; // y = 6 (bo ++y zwieksza poprzednia wartosc o 1), x = 6 * 2 = 12 Console.WriteLine("{0}\t{1}", x, y); x = y++; // y = 7, x = 6 (bo operator post zwraca 'stara' wartosc) Console.WriteLine("{0}\t{1}", x, y); x = y--; // y = 6, x = 7 (jw.) Console.WriteLine("{0}\t{1}", x, y); Console.WriteLine(++y); // y = 7, x = 7 Console.WriteLine("{0}\t{1}", x, y); Console.ReadKey(); } }