text: public static void validateSimple(string s, string legal){{for (int i = 0; i < s.Length; i++){char ch = s[i];if (!((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <='9') || legal.IndexOf(ch) > -1)){throw new java.net.URISyntaxException(s, "Illegal character", i);}}}}