Class BankAccount - as short as possible. | Lecture 5 - slide 10 : 29 Program 1 |
using System; public class BankAccount{ // automatic generation of private instance variables // default parameterless constructor public string Owner {get; set;} public decimal Balance {get; set;} public override string ToString(){ return Owner + "'s account holds " + Balance + " kroner"; } } | An automatic property. Another automatic property. Refers to property getters. The instance variables are anonymous. |