예제 #1
0
        public Bban(string bban)
        {
            Account = bban;
            string tmpRefAccount = Account;

            IsMachineNumber = BankUtil.CorrectNumber(ref tmpRefAccount);
            MachineNumber   = tmpRefAccount;
        }
예제 #2
0
        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();
        }
예제 #3
0
 public bool IsValid()
 {
     return(BankUtil.IsValidAccount(Account));
 }