public static IPHostEntry Resolve(string hostName)
{
if (hostName == null)
throw new ArgumentNullException ("hostName");
IPHostEntry ret = null;
try {
ret = GetHostByAddress(hostName);
}
catch{}
if(ret == null)
ret = GetHostByName(hostName);
return ret;
}
}