| csharp-3/automatic-properties/BankAccount.cs - Class BankAccount with two automatic properties. | Lecture 5 - slide 9 : 29 Program 1 |
using System;
public class BankAccount{
// automatic generation of private instance variables
public BankAccount(string owner, decimal balance){
this.Owner = owner;
this.Balance = balance;
}
public string Owner {get; set;}
public decimal Balance {get; set;}
public override string ToString(){
return Owner + "'s account holds " + Balance + " kroner";
}
}