예제 #1
0
        static void Main(string[] args)
        {
            Dog p = new Puddle();

            p.name = "푸들이";
            p.jitda();
            ((Puddle)p).work();

            Dog j = new Jindo();

            j.name = "진돌이";
            j.jitda();
            ((Jindo)j).Run();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Dog pudle = new Pudle();

            pudle.name = "푸들이";
            pudle.Jitda();
            ((Pudle)pudle).Work();

            Dog jindo = new Jindo();

            jindo.name = "진돌이";
            jindo.Jitda();
            ((Jindo)jindo).Run();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Dog p = new Poodle();

            p.Name = "푸들이";
            p.jitda();
            ((Poodle)p).work();
            (p as Poodle).work();
            behave(p);

            Dog j = new Jindo();

            j.Name = "진도이";
            j.jitda();
            ((Jindo)j).run();
            behave(j);
        }