Wolf wolf = new Wolf();
Animal wolf0 = (Animal)Activator.CreateInstance(wolf.GetType().BaseType);
wolf0.Eat();
try this, 包你滿意
所有跟帖:
•
這個結果是對的,但是不是用的wolf
-牛牛哥-
♀
(66 bytes)
()
09/15/2009 postreply
18:50:14
•
It is still from the wolf. If you don't want wolf0, try this. ((
-me123456-
♀
(124 bytes)
()
09/16/2009 postreply
06:30:15
•
你好像不懂的什麽是Derived,什麽是Base,也不懂得題意
-st.paul-
♂
(118 bytes)
()
09/16/2009 postreply
08:53:12