// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Net.NetworkInformation; using System.Text; public class Ping2 { public static void Main(string[] args) { Ping p = new Ping(); PingReply pr = p.Send("www.tv2.dk"); if(pr.Status == IPStatus.Success) { Console.WriteLine("TV2 oppe (tid = " + pr.RoundtripTime + " ms)"); } else { Console.WriteLine("TV2 nede"); } } }