![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
public bool IsPingOk { get { try { Ping ping = new Ping(); string ipaddress = this.GetIP(AppConfig.AddrHisService); PingReply pr = ping.Send(ipaddress); if (pr.Status == IPStatus.Success) return true; else return false; } catch { return false; } } }
public bool IsPingOk { get { try { Ping ping = new Ping(); string ipaddress = this.GetIP(AppConfig.AddrHisService); PingReply pr = ping.Send(ipaddress); if (pr.Status == IPStatus.Success) return true; else return false; } catch { return false; } } }
转载于:https://www.cnblogs.com/dlzh/p/7105095.html