Override get, But not set

前端 未结 13 2470
暖寄归人
暖寄归人 2020-12-14 14:17

I have an abstract class that defines a get, but not set, because as far as that abstract class is concerned, it needs only a get.

13条回答
  •  醉酒成梦
    2020-12-14 14:46

    You cannot override the set accessor since the base class has no set accessor defined.

    What you can do is use the new keyword to hide the base classes implementation, but that may not be what you want.

提交回复
热议问题