2013-05-02 80 views

回答

0

簡單的黑客對WP7.0

Uri uri = new Uri("http://whatismyip.org"); 
     WebClient client = new WebClient(); 
     client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted); 
     client.DownloadStringAsync(uri); 

void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) 
    { 
     myIP = e.Result; 
    } 

但它的工作,但不是偉大的方式。

對於WP 7.5閱讀Finding Your Own IP Address On Windows Phone Mango

希望這有助於

+0

感謝他同 – Aryan 2013-05-06 17:47:32

相關問題