System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(Environment.MachineName); string strIP = ""; for(int i=0;i<ips.Length;i++) { strIP += ips[i].ToString(); } this.TextBox1.Text = strIP; 相关文章: