Пример #1
0
        // Main Method
        public static void Main()
        {
            // Create a new Geeks object.
            Geeks g1 = new Geeks("June", 2018);

            // here is g1 details is copied to g2.
            Geeks g2 = new Geeks(g1);

            Console.WriteLine(g2.Details);
            Console.ReadLine();
        }
Пример #2
0
 // declaring Copy constructor
 public Geeks(Geeks s)
 {
     month = s.month;
     year  = s.year;
 }