System.Net.IPHostEntry ips = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName());
foreach (System.Net.IPAddress ip in ips.AddressList)
{
    Console.WriteLine(ip.ToString());
}

 

相关文章: