Answers for "check if string is email c#"

C#
4

check if string is email c#

bool IsValidEmail(string email)
{
    try {
        var addr = new System.Net.Mail.MailAddress(email);
        return addr.Address == email;
    }
    catch {
        return false;
    }
}
Posted by: Guest on December-21-2019

Code answers related to "check if string is email c#"

C# Answers by Framework

Browse Popular Code Answers by Language