I cant seem to get or find information on finding my routers public IP? Is this because it cant be done this way and would have to get it from a website?
I do it using HttpClient from System.Net.Http:
public static string PublicIPAddress()
{
string uri = "http://checkip.dyndns.org/";
string ip = String.Empty;
using (var client = new HttpClient())
{
var result = client.GetAsync(uri).Result.Content.ReadAsStringAsync().Result;
ip = result.Split(':')[1].Split('<')[0];
}
return ip;
}