c#ユーザー登録を実現するコンソールアプリケーションの作成方法


ソースコードは次のとおりです.
public class Program
    {
       public static void Main(string[] args)
        {
            Console.WriteLine(" :");
            string name = Console.ReadLine();
            string pwd = "";
            string rpwd = "";
            string email = "";
            string phoneNum = "";
           // 
            do
            {
                Console.WriteLine(" :");
                pwd = Console.ReadLine();
                Console.WriteLine(" :");
                rpwd = Console.ReadLine();
                if (pwd != "" && rpwd != "" && pwd != rpwd)
                {
  Console.WriteLine(" , !");
                }
            } while (pwd != "" && rpwd != "" && pwd != rpwd);

           // 
            bool con = true;  
            do
            {
                Console.WriteLine(" :");
                email = Console.ReadLine();
                con = Regex.IsMatch(email,"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$");
                if (!con)
                {
                    Console.WriteLine(" , !");
                }
            } while (!con);
            // 
           do
            {
                Console.WriteLine(" :");
                phoneNum = Console.ReadLine();
  if (!Regex.IsMatch(phoneNum, "(\\(?\\+?[0-9]{3,}\\)?([._\\- ]?[0-9]+){2,})"))
                {
                    Console.WriteLine(" , !");
                }
            } while (!Regex.IsMatch(phoneNum, "(\\(?\\+?[0-9]{3,}\\)?([._\\- ]?[0-9]+){2,})"));
           Console.WriteLine(" !");
           Console.ReadLine();
        }
         
    }

コード作成完了