获取局域网内的在线IP

longchen 2003-06-30 05:07:33
请问怎样可以取的局域网内在线机器的IP???
...全文
59 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
longchen 2003-07-21
  • 打赏
  • 举报
回复
这样速度好慢啊
ArLi2003 2003-06-30
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/1946/1946755.xml?temp=.4379999
tjq_tang 2003-06-30
  • 打赏
  • 举报
回复
ArrayList arr = new ArrayList();
this.listBox1.Items.Clear();
DirectoryEntry root = new DirectoryEntry("WinNT:");
{
foreach(DirectoryEntry domain in root.Children)
{
foreach(DirectoryEntry computer in domain.Children)
{
arr.Add(computer.Name);
this.listBox1.Items.Add(computer.Name+"->"+computer.Path);


}
}
}
dahuzizyd 2003-06-30
  • 打赏
  • 举报
回复
string s = " ";
System.Net.IPAddress[] addressList =
Dns.GetHostByName(Dns.GetHostName()).AddressList;
for (int i = 0;i < addressList.Length;i++ )
{
s += addressList[i].ToString() + "\n";
}
textBox1.Text = s;
shenshenxiaoyuan 2003-06-30
  • 打赏
  • 举报
回复
gz

顶一下!

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧