public static bool IsNumericDigit(char c) {
return '0' <= c && c <= '9';
public static bool HasNumericDigits(string s) {
for (int i = 0; i < s.Length; i++) {
if (IsNumericDigit(s[i])) return true;
public static bool IsValidPhoneNumber(string s, out string strPhoneNumber) {
for (int i=0; i < s.Length; i++) {
if (IsNumericDigit(s[i]))
return strPhoneNumber.Length == 10;
public static bool IsValidEmail(string s) {
if (word.Length != 2 || word[0].Length == 0)
word = domain.Split('.');
if (word.Length != 2 || word[0].Length == 0)