System.Net.Dns.Resolve(SystemInformation.ComputerName)
using System;
using System.Net;
static void Main(string[] args) {
string machine_name = Dns.GetHostName();
IPHostEntry host = Dns.GetHostByName(machine_name);
for (int i=0; i < host.AddressList.Length; i++){
Console.WriteLine(host.AddressList[i]);
}
Console.ReadLine();
}
using System;
using System.Net;
static void Main(string[] args) {
string machine_name = Dns.GetHostName();
IPHostEntry host = Dns.GetHostByName(machine_name);
for (int i=0; i < host.AddressList.Length; i++){
Console.WriteLine(host.AddressList[i]);
}
Console.ReadLine();
}