Example #1
0
 // Constructor
 public Account(string owner)
 {
     // New accounts are 'Silver' by default
     this._owner = owner;
     this._state = new SilverState(0.0, this);
 }
Example #2
0
        // Overloaded constructors

        public SilverState(SimpleState state) :
            this(state.Balance, state.Account)
        {
        }
Example #3
0
 // Overloaded constructors
 public GoldState(SimpleState state)
     : this(state.Balance, state.Account)
 {
 }
Example #4
0
 // Constructor
 public RedState(SimpleState state)
 {
     this.balance = state.Balance;
     this.account = state.Account;
     Initialize();
 }