コード例 #1
0
        public bool IsValid()
        {
            bool result = false;

            CardValidator cardValidator = new CardValidator();
            string cardNumber = cardValidator.GetCardNumber();
            string pin = GetPIN();

            if (cardNumber == "123456"
                && pin == "pass")
            {
                result = true;
            }
            else
            {
                result = false;
            }

            return result;
        }
コード例 #2
0
 public void Test()
 {
     CardValidator cardValidator = new CardValidator();
     Console.WriteLine(cardValidator.GetCardNumber());
 }