public static IPHostEntry GetHostByName(string hostName) { if (hostName == null) { throw new ArgumentNullException("hostName"); } string h_name; string[] h_aliases; string[] h_addrlist; if (!Dns.GetHostByName_internal(hostName, out h_name, out h_aliases, out h_addrlist)) { throw new System.Net.Sockets.SocketException(11001); } return(Dns.hostent_to_IPHostEntry(h_name, h_aliases, h_addrlist)); }