Friday, March 2, 2012

How to validate if an email address is syntax valid in C#?

As a simple question: how do you validate if an email address is correct? (by syntax point of view)
If you need this function, to validate an email address you should use this method which is using regular experssions:
public bool IsEmailSyntaxValid(string emailToValidate)
            return System.Text.RegularExpressions.Regex.IsMatch(emailToValidate,

No comments:

Post a Comment