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;

解决方案 »

  1.   

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

  2.   

    http://expert.csdn.net/Expert/topic/1946/1946755.xml?temp=.4379999