public IAccount ChangeAccount(string accountCode) { SaveChanges(); CurrentAccountCode = accountCode; RealSubject = new PointsAccount(); foreach (var account in AccountBalances) { if (account.Key == accountCode) { RealSubject.AddPoints(account.Value); return(RealSubject); } } AccountBalances.Add(accountCode, 0); return(RealSubject); }