How do I get the IP address of a machine in C#?
IPHostEntry ip = DNS.GetHostByName (strHostName); IPAddress [] IPaddr = ip.AddressList; for (int i = 0; i < IPaddr.Length; i++) { Console.WriteLine ("IP Address {0}: {1} ", i, IPaddr[i].ToString ()); }