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;
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;
解决方案 »
- 如何让SmtpClient通过http代理服务器发送邮件?
- 查错?急
- 100分求教 怎么直接用控件设置datagrid 显示数据
- datagrid 实现单元格的回车事件后 ,单元格不能编辑!请高手帮忙!
- DataGridView中能否插入一行
- devexpress.NET Windows Forms Components Suite
- c# 中调用 vc 的动态库函数,函数中的返回参数(字符串型)如何在C#中调用.
- 急!
- 请教:如下错误是怎么引起的
- VB 可以,C#不可以,为什么?
- 关于缓存中的datatable的数据更新的SQLSERVER??我等!!!
- 动态数组与类数组是如何实现拷贝功能的?
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);
}
}
}