using System;
public class Program
{
public static void Main()
int a = 4;
int b = 12;
Display(a,b);
Swap(ref a, ref b);
//No coding here
}
//swap a's value with and b's value.
private static void Swap(ref int a, ref int b){ //Ref means it'll be passed back
/* Only code here */
a+=b; //4+12=16
b=a-b; //4-16=-12
/*got this far on my own but then it stopped making sense*/
a=a-b; //4--12=-8???
private static void Display(int a, int b){
Console.WriteLine("A = {0}, B = {1}", a, b);