public static void Main()
Console.WriteLine("Hello Swapsies");
Test.TestSwap(int.MaxValue, 1);
Test.TestSwap(int.MaxValue, int.MaxValue);
Test.TestSwap(0, int.MaxValue);
public static void Swap(ref int x, ref int y)
public static void Swap2(ref int x, ref int y)
public static void Swap3(ref int x, ref int y)
public static void TestSwap(int x, int y)
Console.Write("x={0} \r y={1} \r", x, y);
Program.Swap2(ref x, ref y);
Console.Write("--> x={0} \r y={1} \r", x, y);
Console.WriteLine( (y == x0 && x == y0) ? "OK!" : "FAIL" );