Exemple #1
0
        static void Main(string[] args)
        {
            MyClass M=new MyClass();
            M.Age = 10;
            M.Name = "unos";

            MyClass A = new MyClass();
            A.Age = 20;
            A.Name = "reza";

            M = A;   // they point to the same place in memory

            A = null;   // A got null but M's reference to memory is alive. check M

            M.Update(30,"meysam");

               M.Update2(M);

            Console.ReadLine();
        }