[DllImport("wininet")]

        private extern static bool InternetGetConnectedState(out int connectionDescription, int reservedValue);

 

 

c#自带的Ping,using System.Net.NetworkInformation;
Ping ping = new Ping();

 

PingReply reply = ping.Send(ip, 100);
if (reply.Status == IPStatus.Success)
{

posted on 2018-12-13 10:50  eristjy  阅读(107)  评论(0编辑  收藏  举报