Beispiel #1
0
        static void Main()
        {
            CopyConDemo cd1 = new CopyConDemo(10);

            cd1.Display();
            CopyConDemo cd2 = new CopyConDemo(cd1);

            cd2.Display();

            Console.ReadLine();
        }
Beispiel #2
0
 public CopyConDemo(CopyConDemo obj) //Copy constructor that copies values of object already created
 {
     x = obj.x;
 }