IsValidEmailAddress

public static class ScottGuExtensions
{
    public static bool IsValidEmailAddress(this string s)
    {
        Regex regex = new Regex(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$");
        return regex.IsMatch(s);
    }
} 
Example:
bool f = "test@test.com".IsValidEmailAddress();

Description

Check wheter a string is an valid e-mail address

Details

Double click on the code to select all.

 

;