CSharp examples for System.Text.RegularExpressions:Match Email
Is Not Invalid Email
using System.Text.RegularExpressions; using System;//w w w. jav a 2 s. c om public class Main{ public static void IsNotInvalidEmail(string param, string name) { if (!String.IsNullOrEmpty(param) && !EmailExpression.IsMatch(param)) { throw new ArgumentException(String.Format("\"{0}\" is not a valid email address.", name)); } } }