networking - How to find IP Assigned to my PC by Router using C# -
my pc connected wifi network. , want ip-address assigned(to pc) wifi-network device(router or something). or might say, want find ip-address of pc on network.
actually, pc has more 1 network adapters created (3 ethernet adapters , 1 wifi-adapter).
i tried following code:
iphostentry localhostentry = dns.gethostbyname(dns.gethostname()); string myip = localhostentry.addresslist[0].tostring();
but returns: 192.168.138.1
while ip assigned pc wifi-network-device is: 192.168.1.21
192.168.138.1 ip of ethernet adapter.