How to validate email addess in Windows Forms
Today I want to add validation for email address in a Windows Forms application. I searched google, but didn’t got any simple solution. Then I tried with ASP.Net regex validation control and took the validation expression from it used in RegEx class.
Here is code
static bool IsValidEmail(string Email)
{
Regex regex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
return regex.IsMatch(emailAddress);
}
Happy Coding [:)]

hey thanks for the post, that was exactly what i needed this am…appreciate you saving me some time…have a great day!
Welcome Jonathan Parker. Thank you for your comments.
Look up the built in filter_vars methods too, even easier
$ip = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
$email = filter_var($email, FILTER_VALIDATE_EMAIL);
http://us2.php.net/filter_var
more
http://us3.php.net/manual/hu/ref.filter.php
for php 5 and up.
You can both validate and santize
Sorry, I blogged about validate mail address using .Net. Not Php or Javascript
Im sorry, I guess I saw windows forms and without thinking thought of php.
My apologies. Pls feel free to delete that post.
it is okay buddy