Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            int myNum1 = 2;
            int myNum2;

            myNum2 = myNum1;

            myNum1 = 42;

            Console.WriteLine("myNum2: "+ myNum2 + "\n" + "myNum1: " + myNum1 + "\n");

            Object obj1 = new Object();

            obj1.Print();
            Object obj2;

            obj2 = obj1;
            obj2.Print();

            Object obj3 = new Object();
            obj1 = obj3;
            obj1.Print();

            //    int myInt = 20;

            //    SetValue2(myInt);
            //    Console.WriteLine("From Main(): " + myInt);

            //    Console.WriteLine("Original myInt Value: " + myInt);
            //    Console.WriteLine();
            //    SetValue1(ref myInt);
            //    Console.WriteLine("From Main(): " +myInt);
            //    Console.WriteLine();

            //    SetValue(out myInt);
            //    Console.WriteLine("From Main(): " +myInt);

            //    Console.WriteLine();
        }