1 //根据域名解析出IP 2 IPHostEntry hostinfo = Dns.GetHostByName("baidu.com"); 3 IPAddress[] aryIP = hostinfo.AddressList; 4 IPAddress address = aryIP[0];
时间: 2024-10-29 03:47:12
1 //根据域名解析出IP 2 IPHostEntry hostinfo = Dns.GetHostByName("baidu.com"); 3 IPAddress[] aryIP = hostinfo.AddressList; 4 IPAddress address = aryIP[0];