public void UseDNS()
{
string hostName = Dns.GetHostName();
Console.WriteLine("Host Name = " + hostName);
IPHostEntry local = Dns.GetHostByName(hostName);
foreach(IPAddress ipaddress in local.AddressList)
{
Console.WriteLine("IPAddress = " + ipaddress.ToString());
}
}
Showing posts with label How to get IP address of the Current Machine?. Show all posts
Showing posts with label How to get IP address of the Current Machine?. Show all posts
Thursday, October 16, 2008
Subscribe to:
Posts (Atom)
