Created
November 22, 2018 18:44
-
-
Save yhau1989/da7b3ed25ee491d227ce643264ce8808 to your computer and use it in GitHub Desktop.
validate email address c#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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