static void Main(string[] args)
        {
            dog d1 = new dog();

            call(d1);
            cat c1 = new cat();

            call(c1);
            donkey d2 = new donkey();

            call(d2);
        }
Ejemplo n.º 2
0
        public static void Main(String[] args)
        {
            Animal ref1 = new dog();
            Animal ref2 = new cat();
            Animal ref3 = new donkey();

            showpoly show = new showpoly();

            show.call(ref1);
            show.call(ref2);
            show.call(ref3);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            showPoly s = new showPoly();
            dog      d = new dog();

            s.call(d);
            cat c = new cat();

            s.call(c);

            donkey d1 = new donkey();

            s.call(d1);


            Animal a = new Animal();

            Console.ReadLine();
        }