String hostname;
hostname=Dns.GetHostName();
IPHostEntry hostip=Dns.GetHostByName(hostname);
IPAddress ip=hostip.AddressList[0];
lblShow.Text="机器名称:"+hostname + "<br>IP地址:"+ip.ToString();
hostname=Dns.GetHostName();
IPHostEntry hostip=Dns.GetHostByName(hostname);
IPAddress ip=hostip.AddressList[0];
lblShow.Text="机器名称:"+hostname + "<br>IP地址:"+ip.ToString();
我是想得到域的名称
比如http://abc.hello.com中的hello.com