using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { IPHostEntry hostinfo = Dns.GetHostEntry(@www.baidu.com); IPAddress[] aryIP = hostinfo.AddressList; foreach (IPAddress result in aryIP) { Console.WriteLine(result.ToString()); } } } }
<div style="height:100px;100px;border:1px solid red">
</div>