C# - How to detect all IP addresses from a LAN?
- by SAMIR BHOGAYTA
string strHostName = string.Empty;
cmbIPAddress.Items.Clear();
// Getting Ip address of local machine...
// First get the host name of local machine.
strHostName = Dns.GetHostName();
// Then using host name, get the IP address list..
IPHostEntry ipEntry = Dns.GetHostByName(strHostName);
IPAddress[] iparrAddr =…