/// <summary>
        /// Construct from BKStreamReader
        /// </summary>
        public BKBankAccount(BankLinkTokenStreamReader s)
        {
            var token = BeginToken;

            while (token != EndToken)
            {
                switch (token)
                {
                case 152:
                    BankAccountNumber = s.ReadShortStringValue("BankAccountNumber");
                    break;

                case 153:
                    BankAccountName = s.ReadShortStringValue("BankAccountName");
                    break;

                case 154:
                    BankAccountPassword = s.ReadShortStringValue("BankAccountPassword");
                    break;

                case 155:
                    ContraAccountCode = s.ReadShortStringValue("ContraAccountCode");
                    break;

                case 156:
                    CurrentBalance = s.ReadMoneyValue("CurrentBalance");
                    break;

                case 157:
                    ApplyMasterMemorisedEntries = s.ReadBooleanValue("ApplyMasterMemorisedEntries");
                    break;

                case 158:
                    AccountType = s.ReadByteValue("AccountType");
                    break;

                case 159:
                    ColumnOrder = s.ReadByteArray("ColumnOrder", 159, 32, true);
                    break;

                case 160:
                    ColumnWidth = s.ReadInt32Array("ColumnWidth", 160, 32, true);
                    break;

                case 161:
                    PreferredView = s.ReadByteValue("PreferredView");
                    break;

                case 162:
                    HighestBankLinkID = s.ReadInt32Value("HighestBankLinkID");
                    break;

                case 163:
                    HighestLRN = s.ReadInt32Value("HighestLRN");
                    break;

                case 164:
                    ColumnisHidden = s.ReadBooleanArray("ColumnisHidden", 164, 32, true);
                    break;

                case 165:
                    AccountExpiryDate = s.ReadJulDateValue("AccountExpiryDate");
                    break;

                case 166:
                    HighestMatchedItemID = s.ReadInt32Value("HighestMatchedItemID");
                    break;

                case 167:
                    NotesAlwaysVisible = s.ReadBooleanValue("NotesAlwaysVisible");
                    break;

                case 168:
                    NotesHeight = s.ReadInt32Value("NotesHeight");
                    break;

                case 169:
                    LastECodingTransactionUID = s.ReadInt32Value("LastECodingTransactionUID");
                    break;

                case 170:
                    ColumnIsNotEditable = s.ReadBooleanArray("ColumnIsNotEditable", 170, 32, true);
                    break;

                case 171:
                    ExtendExpiryDate = s.ReadBooleanValue("ExtendExpiryDate");
                    break;

                case 172:
                    IsAManualAccount = s.ReadBooleanValue("IsAManualAccount");
                    break;

                case 173:
                    AnalysisCodingLevel = s.ReadInt32Value("AnalysisCodingLevel");
                    break;

                case 174:
                    ECodingAccountUID = s.ReadInt32Value("ECodingAccountUID");
                    break;

                case 175:
                    CodingSortOrder = s.ReadInt32Value("CodingSortOrder");
                    break;

                case 176:
                    ManualAccountType = s.ReadInt32Value("ManualAccountType");
                    break;

                case 177:
                    ManualAccountInstitution = s.ReadShortStringValue("ManualAccountInstitution");
                    break;

                case 178:
                    ManualAccountSentToAdmin = s.ReadBooleanValue("ManualAccountSentToAdmin");
                    break;

                case 179:
                    SpareString = s.ReadAnsiStringValue("SpareString");
                    break;

                case 180:
                    IsAProvisionalAccount = s.ReadBooleanValue("IsAProvisionalAccount");
                    break;

                case 181:
                    SpareNumber = s.ReadInt32Value("SpareNumber");
                    break;

                case 182:
                    SpareByte = s.ReadByteValue("SpareByte");
                    break;

                case 183:
                    HDEColumnOrder = s.ReadByteArray("HDEColumnOrder", 183, 32, true);
                    break;

                case 184:
                    HDEColumnWidth = s.ReadInt32Array("HDEColumnWidth", 184, 32, true);
                    break;

                case 185:
                    HDEColumnisHidden = s.ReadBooleanArray("HDEColumnisHidden", 185, 32, true);
                    break;

                case 186:
                    HDEColumnisNotEditable = s.ReadBooleanArray("HDEColumnisNotEditable", 186, 32, true);
                    break;

                case 187:
                    HDESortOrder = s.ReadInt32Value("HDESortOrder");
                    break;

                case 188:
                    MDEColumnOrder = s.ReadByteArray("MDEColumnOrder", 188, 32, true);
                    break;

                case 189:
                    MDEColumnWidth = s.ReadInt32Array("MDEColumnWidth", 189, 32, true);
                    break;

                case 190:
                    MDEColumnisHidden = s.ReadBooleanArray("MDEColumnisHidden", 190, 32, true);
                    break;

                case 191:
                    MDEColumnisNotEditable = s.ReadBooleanArray("MDEColumnisNotEditable", 191, 32, true);
                    break;

                case 192:
                    MDESortOrder = s.ReadInt32Value("MDESortOrder");
                    break;

                case 193:
                    DISColumnOrder = s.ReadByteArray("DISColumnOrder", 193, 32, true);
                    break;

                case 194:
                    DISColumnWidth = s.ReadInt32Array("DISColumnWidth", 194, 32, true);
                    break;

                case 195:
                    DISColumnisHidden = s.ReadBooleanArray("DISColumnisHidden", 195, 32, true);
                    break;

                case 196:
                    DISColumnisNotEditable = s.ReadBooleanArray("DISColumnisNotEditable", 196, 32, true);
                    break;

                case 197:
                    DISSortOrder = s.ReadInt32Value("DISSortOrder");
                    break;

                case 198:
                    DesktopSuperLedgerID = s.ReadInt32Value("DesktopSuperLedgerID");
                    break;

                case 199:
                    CurrencyCode = s.ReadShortStringValue("CurrencyCode");
                    break;

                case 200:
                    DefaultForexSource = s.ReadShortStringValue("DefaultForexSource");
                    break;

                case 201:
                    DefaultForexDescription = s.ReadShortStringValue("DefaultForexDescription");
                    break;

                case 202:
                    SuperFundLedgerCode = s.ReadShortStringValue("SuperFundLedgerCode");
                    break;

                case 203:
                    AuditRecordID = s.ReadInt32Value("AuditRecordID");
                    break;

                case 204:
                    CoreAccountID = s.ReadInt32Value("CoreAccountID");
                    break;

                case 205:
                    SecureOnlineCode = s.ReadShortStringValue("SecureOnlineCode");
                    break;

                case 206:
                    ExchangeGainLossCode = s.ReadShortStringValue("ExchangeGainLossCode");
                    break;

                case 207:
                    ExtractAccountNumber = s.ReadShortStringValue("ExtractAccountNumber");
                    break;

                case BeginToken:
                case EndToken:
                    break;

                default:
                    throw new Exception(string.Format("unexpected Code: {0} reading BankAccount", token));
                }
                token = s.ReadToken();
            }
        }