Calling the following gives you a list of all the IP addresses.
Dns.GetHostAddresses(Dns.GetHostName())
This sometimes, depending on the configuration of the machine, can give you more than one IP address. So the question is, how to determine which is the primary IP address? Do you list network cards?
Adrian
source
share