C# .net通过域名获取IP(转) IPAddress[] IPs = Dns.GetHostAddresses("www.by84.com"); foreach (IPAddress ip in IPs) { Response.Write(ip.ToString()+"<br>"); } 别忘了引用System.Net命名空间.