GetHostEntry 方法的小问题
 MessageBox.Show(Dns.GetHostEntry( "168.242.231.43 ").HostName); 
 MessageBox.Show(Dns.GetHostByAddress( "168.242.231.43 ").HostName); 
 为啥第一个弹出的是168.242.231.43,而第二个可以弹出主机名。 
 然后改了下 
             IPAddress   ip   =   IPAddress.Parse( "168.242.231.43 "); 
             IPHostEntry   ihe   =   Dns.GetHostEntry(ip); 
             MessageBox.Show(ihe.HostName); 
 依然不好用。 
 求,用GetHostEntry通过ip获得主机名字的准确代码
------解决方案--------------------IPHostEntry iphe = Dns.Resolve( "192.168.231.43 "); 
 Console.WriteLine(iphe.HostName);
------解决方案--------------------没有错啊 我试验了一下 你写的是可以的 (ps:2005 下)
------解决方案--------------------你的MessageBox.Show(Dns.GetHostByAddress( "168.242.231.43 ").HostName);能显示机器名? 
 我的怎么就显示了个www? 
 要是只能显示自己的,别人的都不行。 
 后来我用了nbstat。 
 不知道还有没有别的解决方案~~~~