📌  相关文章
📜  检查字符串是否为电子邮件 c# 代码示例

📅  最后修改于: 2022-03-11 14:48:59.741000             🧑  作者: Mango

代码示例1
bool IsValidEmail(string email)
{
    try {
        var addr = new System.Net.Mail.MailAddress(email);
        return addr.Address == email;
    }
    catch {
        return false;
    }
}