判断邮箱的地址是否正确

 static void Main(string[] args)
        {
            string a;
            Console.WriteLine("请输入您的邮箱地址:");
           a = Console.ReadLine();
            if (a.Contains("@")&&a.Contains(".com"))   //这句话的意思是a包含@并且包含.com
            {
                Console.WriteLine("这是一个正确的邮箱地址");
            }
 
            Console.ReadLine();
        }

原文地址:https://www.cnblogs.com/lk-kk/p/4388111.html