C#根据域名获取ip地址
using System.Net; public class NetworkUtils { public static string GetHostName(IPAddress ipAddress) { IPHostEntry entry = Dns.GetHostEntry(ipAddress); return entry.HostName; } }
C#根据域名获取ip地址
using System.Net; public class NetworkUtils { public static string GetHostName(IPAddress ipAddress) { IPHostEntry entry = Dns.GetHostEntry(ipAddress); return entry.HostName; } }