How can I find all IP addresses of machines which are connected using LAN network.
foreach (NetworkInterface netInterface in NetworkInterface.GetAllNetworkInterfaces())
{
IPInterfaceProperties ipProps = netInterface.GetIPProperties();
foreach (UnicastIPAddressInformation addr in ipProps.UnicastAddresses)
{
listBox1.Items.Add(addr.Address.ToString());
}
}
Here the code i am using.. but this code return me only my local ip and 127.0.0.1. Can't find other ip address.