100Microsoft Visual Studio 2010: A Beginner’s Guide
public decimal CurrentBalance { get; set; }
}
}
VB:
Public Class Saving
Implements IAccount
Public Sub Credit(ByVal amount As Decimal) Implements IAccount. Credit
'Implement Saving logic CurrentBalance += amount
Console.Writeline("Added " & amount.ToString() &
"to Saving Account")
End Sub
Public Sub Debit(ByVal amount As Decimal) Implements IAccount.Debit
'Implement Saving logic CurrentBalance
Console.Writeline("Debited " + amount.ToString() +
"from Saving Account")
End Sub
Public Property CurrentBalance As Decimal
Implements IAccount.CurrentBalance
End Class
In both Listings
C#:
class Checking : IAccount
and
class Saving : IAccount
VB:
Public Class Checking
Implements IAccount
and
Public Class Saving Implements IAccount