Persons.Person.IsValidEmail C# (CSharp) Method

IsValidEmail() private method

private IsValidEmail ( string email ) : bool
email string
return bool
        bool IsValidEmail(string email)
        {
            try
            {
                var addr = new System.Net.Mail.MailAddress(email);
                return addr.Address == email;
            }
            catch
            {
                if (string.IsNullOrEmpty(email))
                {
                    return true; // Null is acceptable for this task
                }
                return false;
            }
        }