How to know external ip adress of the current pc

Posted by Sergei on Stack Overflow See other posts from Stack Overflow or by Sergei
Published on 2010-05-02T10:30:38Z Indexed on 2010/05/02 10:37 UTC
Read the original article Hit count: 139

Filed under:
|

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();

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#