コード例 #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));
 }