public static void Main()
Console.Write("Value 1: ");
int val1 = int.Parse(Console.ReadLine());
Console.Write("Value 2: ");
int val2 = int.Parse(Console.ReadLine());
SwapTwoValues(ref val1,ref val2);
Console.WriteLine ("The first value is {0} and the second - {1}", val1,val2);
private static void SwapTwoValues(ref int val1,ref int val2) {
Console.WriteLine ("The swapped values are {0} and {1}", val1,val2);