c#获取本机IP,机器名,然后是操作系统版本

            string hostname = System.Net.Dns.GetHostName();
            System.Net.IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(hostname);
            dr["NodeIP"] = ipEntry.AddressList[0].ToString();
            dr["NodeName"] = hostname;
            dr["NodeOSDesc"] = System.Environment.OSVersion.VersionString;

posted on 2008-06-10 14:25  步走高飞  阅读(2355)  评论(0编辑  收藏  举报

导航