获取本机IP
string ip = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault<IPAddress>(a => a.AddressFamily.ToString().Equals("InterNetwork")).ToString();
posted on 2017-11-03 16:54 YellowCool 阅读(166) 评论(0) 编辑 收藏 举报
string ip = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault<IPAddress>(a => a.AddressFamily.ToString().Equals("InterNetwork")).ToString();
posted on 2017-11-03 16:54 YellowCool 阅读(166) 评论(0) 编辑 收藏 举报