工具类

获取IP
                                IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());
                                var ippaddress = host
                                    .AddressList
                                    .FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork);

 

posted on 2024-08-20 08:43  RookieBoy666  阅读(2)  评论(0编辑  收藏  举报