| A client program. | Lecture 5 - slide 7 : 29 Program 3 |
using System;
class C{
public static void Main(){
BankAccount ba = new BankAccount("Peter", 1000);
Console.WriteLine(ba);
ba.Deposit(100);
Console.WriteLine("Balance: {0}", ba.Balance);
ba.Withdraw(300);
Console.WriteLine("Balance: {0}", ba.Balance);
ba.Deposit(100);
Console.WriteLine("Balance: {0}", ba.Balance);
}
} | Three activations of a property as opposed to accessing the value of a variable. |