public static void Main(string[] args)
        {
            Console.WriteLine("Welcome to User Registration program");
            Patterns patternsMatch = new Patterns();

            Console.WriteLine("FirstName:" + patternsMatch.ValidateFirstName("Hema"));
            Console.WriteLine("LastName:" + patternsMatch.ValidateLastName("Latha"));
            Console.WriteLine("EmailId:" + patternsMatch.ValidateEmailId("*****@*****.**"));
            Console.WriteLine("MobileNumber:" + patternsMatch.ValidateMobileNumber("91 9123456789"));
            Console.WriteLine("Password:"******"Hema@1234"));
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to user registration problem");
            Patterns patterns = new Patterns();

            //reads first name from user
            Console.WriteLine("Enter first Name");
            Console.WriteLine(patterns.ValidateName(Console.ReadLine()));
            //reads last name from user
            Console.WriteLine("Enter last Name");
            Console.WriteLine(patterns.ValidateName(Console.ReadLine()));
            //reads email from user
            Console.WriteLine("Enter mail");
            Console.WriteLine(patterns.ValidateEmail(Console.ReadLine()));
            //reads mobile number from user
            Console.WriteLine("Enter Mobile number");
            Console.WriteLine(patterns.ValidateMobileNumber(Console.ReadLine()));
            //reads password from user
            Console.WriteLine("Enter Password (minimum 8 characters)");
            Console.WriteLine(patterns.ValidatePassword(Console.ReadLine()));
        }