c#实现Ping功能代码
System.Net.NetworkInformation.Ping png = new System.Net.NetworkInformation.Ping(); try { PingReply rply = png.Send("outofmemory.cn"); Console.Write(rply.RoundtripTime.ToString()); Console.ReadLine(); } catch (Exception) { Console.Write("Ping Error"); Console.ReadLine(); }