private GetHostByAddress ( |
||
address | ||
return |
public static IPHostEntry Resolve(string hostName) { if (hostName == null) { throw new ArgumentNullException("hostName"); } IPHostEntry iphostEntry = null; try { iphostEntry = Dns.GetHostByAddress(hostName); } catch { } if (iphostEntry == null) { iphostEntry = Dns.GetHostByName(hostName); } return(iphostEntry); }