public Bban(string bban) { Account = bban; string tmpRefAccount = Account; IsMachineNumber = BankUtil.CorrectNumber(ref tmpRefAccount); MachineNumber = tmpRefAccount; }
static void Main(string[] args) { string machineFormat = "A227720-35988"; bool isMachineFormat = BankUtil.CorrectNumber(ref machineFormat); if (isMachineFormat) { Console.WriteLine($"{machineFormat} - {BankUtil.IsValidAccount(machineFormat)}"); } else { Console.WriteLine("Account number incorrect!"); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
public bool IsValid() { return(BankUtil.IsValidAccount(Account)); }