Ping ,C#检测网络上的IP地址的可靠性


using System.Net;
using System.Net.NetworkInformation;

namespace xumh
{
    
class MyApp
    
{
        
public static void Main()
        
{
            PingReply reply 
= new Ping().Send("127.0.0.1");
            
if(reply.Status == IPStatus.Success)
                System.Console.WriteLine(
"Ping successfully.");
            
else
                System.Console.WriteLine(
"Ping failure.");
        }

    }
;
}

原文地址:https://www.cnblogs.com/flaaash/p/1088850.html