更新时间:2023-11-26 20:04:16
您已使用 System.Net.NetworkInformation.Ping
参见下文。
var ping = new System.Net.NetworkInformation.Ping();
var result = ping.Send("www.google.com");
if (result.Status != System.Net.NetworkInformation.IPStatus.Success)
return;