C#关于判断网络是否连通,该如何解决
C#关于判断网络是否连通
在网络中,如何在PC1上判断PC2和PC3是否连通?C#的代码该怎么写?
------解决方案--------------------
http://topic.csdn.net/u/20110411/13/eb614d27-c1b6-469a-9b34-ec55ff94520c.html
------解决方案--------------------
在网络中,如何在PC1上判断PC2和PC3是否连通?C#的代码该怎么写?
------解决方案--------------------
http://topic.csdn.net/u/20110411/13/eb614d27-c1b6-469a-9b34-ec55ff94520c.html
------解决方案--------------------
- C# code
Ping p = new Ping(); PingReply pr2 = p.Send(PC2 IP地址); if (pr2.Status == IPStatus.Success) { // PC2 通 } PingReply pr3 = p.Send(PC3 IP地址); if (pr3.Status == IPStatus.Success) { // PC3 通 }