How to find the external ip address of the current PC

For example, to get the local IP address, I use:

string myHost = System.Net.Dns.GetHostName(); string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString(); 
+4
source share
1 answer

here is a link that might help. http://www.dreamincode.net/forums/topic/24692-showing-the-external-ip-address-in-c%23/

There's a good article on how to do webrequest for WhatIsMyIP.com

+3
source

Source: https://habr.com/ru/post/1308589/


All Articles