To determine the account type, you need to look at the type of the object, then cast it to the appropriate type. Each account type may have some additional class members (i.e the BankingAccount type has a bankingAccountType property).
For example:
// Check account type
if (account.GetType() == typeof(BankingAccount))
{
// Get banking account type.
var bankingAccount = (BankingAccount)account;
if (bankingAccount.bankingAccountTypeFieldSpecified)
{
var bankingAccountType = bankingAccount.bankingAccountType;
}
}