using System.Text.RegularExpressions;
publicclass Base
{
privatestatic bool isValidEmail(string email)
{
Regex r = new Regex(@"^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$");
if (!string.IsNullOrEmpty(email))
return r.IsMatch(email);
elsereturn false;
}
}