Public class Base
Public virtual string Hello() {return “Base”;}
Public class Sub:Base
Public override string Hello() {return “Sub”;}
1. Base b = new Base(); b.Hello;
2. Sub s = new Sub(); s.Hello;
3. Base b = new Sub (); b.Hello;
4. Sub s = new Base(); s.Hello;
参考答案