📜  在 C# 代码示例中获取站点 ip

📅  最后修改于: 2022-03-11 14:48:53.937000             🧑  作者: Mango

代码示例1
var url = "https://www.google.com/";
Uri myUri = new Uri(url);
var ip = Dns.GetHostAddresses(myUri.Host)[0];