0

How do I get all the IP addresses with device's name that are connected on the same network? So far I have only seen getting local IP address of one's device.

1 Answers1

0

if you have the device name you can use this...

 IPAddress[] IpInHostAddress = Dns.GetHostAddresses("PCNAME");
 strIpAddress = IpInHostAddress[0].ToString();
Daniel Jee
  • 51
  • 5
  • Thank you. It does work when you add the device's name. What about getting all the IP Addresses with each of their device's names? –  Jul 17 '19 at 07:56
  • ahh, sorry miss read your question, the morning coffee hasn't kicked in yet. that would involve pinging your ip range, see Cid's comment on you question. the link he added is a good example. – Daniel Jee Jul 17 '19 at 08:02