static void Main(string[] args)
 {
     Console.WriteLine("Interchange the value");
     Console.WriteLine("Before Interchange");
     Console.WriteLine("------------------");
     Interchange aInterchange=new Interchange();
     Console.WriteLine("x is:"+aInterchange.x +"\n"+"y is:"+aInterchange.y+"\n");
     Console.WriteLine("After Interchange");
     Console.WriteLine("------------------");
     aInterchange.exchange();
     Console.ReadKey();
 }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Interchange the value");
            Console.WriteLine("Before Interchange");
            Console.WriteLine("------------------");
            Interchange aInterchange = new Interchange();

            Console.WriteLine("x is:" + aInterchange.x + "\n" + "y is:" + aInterchange.y + "\n");
            Console.WriteLine("After Interchange");
            Console.WriteLine("------------------");
            aInterchange.exchange();
            Console.ReadKey();
        }