c#获取本机IP 4 地址

lbAddress.Text = System.Net.Dns.GetHostAddresses(hostName).Where(ip => ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).First().ToString();

posted @ 2015-04-14 17:39  巩乃斯大叔  阅读(400)  评论(0编辑  收藏  举报