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); }
void Operate() { var dog = new Poodle(); dog.HasSpoken += dog_HasSpoken; }