Пример #1
0
        private void Main03()
        {
            Animal an1 = new Dinosaur(6, 16, "male", 55);
            Animal an2 = new Rabbit(2, 6, "female", 25);

            Console.WriteLine(an1.Voice());
            Console.WriteLine(an2.Voice());
            Animal cn1, cn2;

            cn1 = an1.Copy();
            cn2 = an2.Copy();
            Console.WriteLine(cn1);
            Console.WriteLine(cn2);
            Rabbit bn2 = (Rabbit)an2.Copy();
        }