using System.Net;
public static void domain2ip()
{
try
{
IPHostEntry ipHostInfo = Dns.Resolve("www.163.com");
IPAddress myip = ipHostInfo.AddressList[0];
}
catch (Exception e)
{
}
}