0
Here's another way of doing it:
int i = 1;
int j = 2;
i ^= j;
j ^= i;
i ^= j;
Console.WriteLine("i = {0}, j = {1}", i, j);
0
Something like this, try it..
int i = 1;
int j = 2;
Console.WriteLine("i = " + i);
Console.WriteLine("j = " + j);
i = (j + i);
j = (i - j);
i = (i - j);
Console.WriteLine("");
Console.WriteLine("i = " + i);
Console.WriteLine("j = " + j);
Console.ReadKey();