Friday, January 11, 2008

Quiz of the day

What is the significance of this keyword for the string s parameter? What kind of method is IsValidEmailAddress?

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

No comments: