Calling the following gives you back a list of all the IP addresses.
Dns.GetHostAddresses(Dns.GetHostName())
This sometimes, depending on machine configuration, could give you back more than one IP. So the question is, how do you determine which is the primary IP address? Do you enumerate the NICs?