簡體   English   中英

如何知道當前pc的外部ip地址

[英]How to know external ip adress of the current pc

例如,為了獲取我使用的本地IP地址:

 string myHost = System.Net.Dns.GetHostName();
 string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();

這是一個可能有用的鏈接。 http://www.dreamincode.net/forums/topic/24692-showing-the-external-ip-address-in-c%23/

關於向WhatIsMyIP.com進行網絡請求的帖子很好

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM