如何使用.NET / C#将域名解析为IP地址?

===============>>#1 票数:19 已采纳

using System.Net;

foreach (IPAddress address in Dns.GetHostAddresses("www.google.com"))
{
   Console.WriteLine(address.ToString());
}

===============>>#2 票数:0

尝试使用System.Net.Dns

  ask by Antonio Haley translate from so

未解决问题?本站智能推荐: