Hi There,
i have a program that is trying to get the IP address of any PC on our netowrk
I have been using the below semi-successfully, yet it will only work if an IP address actually exists in the first list.
string HostName = Dns.GetHostName();
Dns.GetHostEntry(HostName).AddressList[0].ToString()
however,
the problem arises when the entry 0 does not exist, and it is actually entry 1 or 2 for that matter..
How can i go around this so that no matter which entry actually has the IP address of 192.168.XXX.XXX, it will p[ick it up and tell me the whole IP.
Thanks in advance