如何ping IP地址? [英] How to ping IP Adresses ?
本文介绍了如何ping IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi codeproject朋友,
如何执行循环来ping ip地址示例:
从192.168.1.2 ping到192.168.1.255
我想用C#示例的简单算法或简单程序来完成这项工作...
谢谢codeproject成员
hi codeproject friends,
how I can implement a loop to ping ip addresses exemple :
ping from 192.168.1.2 to 192.168.1.255
I want a simple algorithm or a simple program in C# exmplain this work...
thank you codeproject members
推荐答案
看看Ping
^ ].
检查与此
Hi
Check with this
Array.ForEach(Enumerable.Range(2, 255).ToArray(), i =>
{
var reply = new Ping().Send(string.Format("102.168.1.{0}", i));
});
C#具有一个名为"Ping"的内置类
请参见此处
请参见此Ping.send方法
另请参阅以下链接
http://www.codeproject.com/KB/IP/pingdotnet.aspx
http://www.dreamincode.net/forums/topic /71263-using-the-ping-class-in-c%23/
C# has an in-built class named ''Ping''
See here
see Ping.send method in this
Also refer below links
http://www.codeproject.com/KB/IP/pingdotnet.aspx
http://www.dreamincode.net/forums/topic/71263-using-the-ping-class-in-c%23/
这篇关于如何ping IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文