,我有这样的:重载继承抽象方法
abstract class A
{ abstract setSomething(bool f1, bool f2);}
class C : A {setSomethng(bool f1, bool f2){/*implementation*/}}
class B : A {setSomething(bool f1, bool f2, bool f3){/*implementation*/} !! ERROR
我试图改变“setSomething”方法的签名子类中的“B”,但它给我一个错误,说明子类B没有实现基本的抽象类,有没有办法做到这一点?我的意思是重载一个继承的抽象方法?
这是不是由于错字? 'setSomethng'与'setSomething' – 2010-06-26 22:47:19
另外,在你的例子中没有子类D. – 2010-06-26 22:48:58
对不起,我编辑过它是B而不是D. – Lisa 2010-06-26 23:04:26