![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
System.Net.NetworkInformation.Ping pingSender = new System.Net.NetworkInformation.Ping(); PingOptions options = new PingOptions(); options.DontFragment = true; string data = ""; byte[] buffer = Encoding.UTF8.GetBytes(data); int timeout = 120; PingReply reply = pingSender.Send("192.168.2.202", timeout, buffer, options); if (reply.Status == IPStatus.Success) { }