For example to get local ip address I use:
string myHost = System.Net.Dns.GetHostName();
string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();
For example to get local ip address I use:
string myHost = System.Net.Dns.GetHostName();
string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();
here's a link that may help. http://www.dreamincode.net/forums/topic/24692-showing-the-external-ip-address-in-c%23/
There's a good post on doing a webrequest to WhatIsMyIP.com
You could try the following:
IPHostEntry IPHost = Dns.GetHostByName(Dns.GetHostName());
The following is a use example:
lblStatus.Text = "My IP address is " +
IPHost.AddressList[0].ToString();
Edit: ha, ha, derek, beat me to it! ;P