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
If you look closely, you'll see that your account
class in fact doesn't have a withdraw
method.
I'd guess you meant to have your account
class contain a virtual method withdraw
, defined like this:
public virtual void withdraw(float amt) { ... }
Then, in your inherited classes you'd want to override this method, like so:
class currentaccount : account
{
public override void withdraw(float amt)
{
...
base.withdraw(amt)
...
}
...
}
There's also a naming style issue with your code, but this is probably not in the scope of this question :)