“Object” does not contain a definition for “name”

后端 未结 6 1968
误落风尘
误落风尘 2021-01-28 21:39

I\'m having an error message that tells me this:

\'BankAccount.account\' does not contain a definition for \'withdraw\'.

Here\'s my code:

using S         


        
6条回答
  •  鱼传尺愫
    2021-01-28 22:04

    You're calling

    base.withdraw(amt);
    

    from your class savingsaccount. But the base class (account) has no such method. So the compiler is absolutely correct.

提交回复
热议问题