CSharp实现url2ip 2019-07-03 C# C# 0 Word Count: 44(words) Read Count: 1(minutes)代码实现:123456789101112131415public class client { public string GeturlIP(string URL){ string IP = string.Empty; try{ IPHostEntry ipinfo = Dns.GetHostEntry(URL); foreach(IPAddress IPADDRESS in ipinfo.AddressList) { IP = IPADDRESS.ToString(); } } catch {} return IP; } }