static bool validate(int timeout) { bool OK = false; try { TimeoutWebClient wc = new TimeoutWebClient { Timeout = timeout }; wc.Proxy = new WebProxy(ip[counter], Convert.ToInt32(port[counter])); wc.DownloadString("http://google.com/ncr"); OK = true; } catch { } return(OK); }
static bool validate(int timeout) { bool OK = false; try { TimeoutWebClient wc = new TimeoutWebClient { Timeout = timeout }; wc.Proxy = new WebProxy(ip[counter], Convert.ToInt32(port[counter])); wc.DownloadString("http://google.com/ncr"); OK = true; } catch { } return OK; }