域名解析
能不能写一个域名解析的代码给我.谢谢!@!!!
using System;
using System.Net;
using System.Net.Sockets;
string strDomain = args[0].ToString();
IPHostEntry hostEntry = Dns.Resolve(strDomain);
IPEndPoint ipEndPoint = new IPEndPoint( hostEntry.AddressList[0],0);
//这就是你想要的
string ipAddress = ipEndPoint.Address.ToString();
Console.Write(ipAddress);
http://faq.lvjiyong.com/category/dotnet/138/
我也有兴趣, 上面是搜来的,呵呵, 搞定告诉我一声