private static void Timer_Elapsed(object sender, ElapsedEventArgs e) { foreach (var url in urls) { if (ConnectionChecker.ConnectionCheck(url)) { Console.WriteLine(string.Format("the site {0} is up ", url)); } else { Console.WriteLine(string.Format("the site {0} is down ", url)); } } Console.WriteLine("*******************************"); }
private void Timer_Elapsed(object sender, ElapsedEventArgs e) { string[] urls = urlprovider.geturls(); foreach (var url in urls) { if (ConnectionChecker.ConnectionCheck(url)) { RTxtDisplay.Text += string.Format("site {0} is up \n ", url); } else { RTxtDisplay.Text += string.Format("site {0} is down \n ", url); } } RTxtDisplay.Text += "******************* \n"; }