private static string GetHostIp(string host) { try { var ip = new DnsLookup().GetDomainIPs(host).FirstOrDefault(); return(ip == null ? null : ip.ToString()); } catch (Exception) { return(null); } }
private static string GetHostIp(string host) { try { var ip = new DnsLookup().GetDomainIPs(host).FirstOrDefault(); return(ip == null ? null : ip.ToString()); } catch (Exception) { return(null); } }