using System;
public class Program
{
private static void Swap<T>(ref T x, ref T y)
var temp = x;
x = y;
y = temp;
}
public static void Main()
var a = 1;
var b = 2;
Console.WriteLine(a + "->" +b);
Swap<int>(ref a, ref b);