Hi
I developing a networking project.i want view all lan ip address but i view only one system ip address.please referred me.i have no idea.any one please help me
I develop a network project so want to view all ip address
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

NitRiX Reloaded39 reputationPosted Oct 2, 2012, 4:39 AM EDT
// Get host name String strHostName = Dns.GetHostName(); // Find host by name IPHostEntry iphostentry = Dns.GetHostByName(strHostName); // Enumerate IP addresses int nIP = 0; foreach(IPAddress ipaddress in iphostentry.AddressList) { } OR foreach (NetworkInterface netInterface in NetworkInterface.GetAllNetworkInterfaces()) { Console.WriteLine("Name: " + netInterface.Name); Console.WriteLine("Description: " + netInterface.Description); Console.WriteLine("Addresses: "); IPInterfaceProperties ipProps = netInterface.GetIPProperties(); foreach (UnicastIPAddressInformation addr in ipProps.UnicastAddresses) { Console.WriteLine(" " + addr.Address.ToString()); } Console.WriteLine(""); }