예제 #1
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);
        }
예제 #2
0
        void Operate()
        {
            var dog = new Poodle();

            dog.HasSpoken += dog_HasSpoken;
        }