What does Dns.GetHostEntry Method(String) actually do?
问题 I can't find any proper description in the documentation for what this actually does. Does it check for the existence of A records or CNAME records or both? My understanding is that in .NET 4, this throws a SocketException if the host does not exist, and this is confirmed by my testing. 回答1: This is the list of addresses returned by var ips = System.Net.Dns.GetHostEntry("microsoft.com").AddressList; foreach (var ip in ips) Console.WriteLine(ip); // output 64.4.11.37 65.55.58.201 And these are