Skip to content

Instantly share code, notes, and snippets.

@yhau1989
Created November 22, 2018 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhau1989/da7b3ed25ee491d227ce643264ce8808 to your computer and use it in GitHub Desktop.
Save yhau1989/da7b3ed25ee491d227ce643264ce8808 to your computer and use it in GitHub Desktop.
validate email address c#
private bool AddressMailIsValid(string emailaddress)
{
try
{
MailAddress m = new MailAddress(emailaddress);
return true;
}
catch (FormatException)
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment