Data Access, Properties, and Methods
- slide 7 : 29
Properties in C#
Properties allow indirect getting and setting of instance variables
A BankAccount class with a trivial Balance property together with Deposit and Withdraw methods.
A BankAccount class with a Balance property - without a balance instance variable.
A client program.
Output from the client program.
A BankAccount class with a disciplined Balance property.
A client of the disciplined BankAccount.
Output of the this client.
A funny BankAccount