MakubeX

导航

C#获取本机外网IP最简单办法

using (System.Net.WebClient wc = new System.Net.WebClient())
{
    Console.WriteLine(wc.DownloadString("http://www.zu14.cn/ip/"));
}

Console.ReadLine();
 
 
网站只返回 ip字符串...

posted on 2011-01-24 05:49  Makubex  阅读(269)  评论(0编辑  收藏  举报