Ejemplo n.º 1
0
        public static string GetPhoneNumberFromUser()
        {
            string phoneNumStr  = null;
            bool   inputIsValid = false;

            while (inputIsValid == false)
            {
                Console.WriteLine("Please enter your phone number");
                phoneNumStr  = Console.ReadLine();
                inputIsValid = ClientCard.IsPhoneNumberValid(phoneNumStr);
                if (inputIsValid == false)
                {
                    Console.WriteLine("The number must contain 10 digits");
                }
            }

            return(phoneNumStr);
        }