许明会的计算机技术主页

Language:C,C++,.NET Framework(C#)
Thinking:Design Pattern,Algorithm,WPF,Windows Internals
Database:SQLServer,Oracle,MySQL,PostSQL
IT:MCITP,Exchange,Lync,Virtualization,CCNP

导航

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.");
        }

    }
;
}

posted on   许明会  阅读(1249)  评论(1编辑  收藏  举报

努力加载评论中...
点击右上角即可分享
微信分享提示