static void Main() { Dog p = new Pudle(); p.Name = "푸들이"; p.jitda(); ((Pudle)p).Work(); Dog j = new Jindo(); j.Name = "진도이"; j.jitda(); ((Jindo)j).Run(); }
static void Main() { Dog p = new Pudle(); Pudle pp = (Pudle)p; p.name = "푸들이"; p.jitda(); ((Pudle)p).work(); Dog j = new Jindo(); j.name = "진돌이"; j.jitda(); ((Jindo)j).run(); }
static void Main(string[] args) { Dog p = new Pudle(); p.name = "푸들이"; p.jitda(); ((Pudle)p).work(); Dog j = new Jindo(); j.name = "진도이"; j.jitda(); ((Jindo)j).run(); }