摘要:
获取服务器的IP地址方法以DNS法较为简单实用,如下:以下是引用片段: private void ButtonIP_Click(object sender, System.EventArgs e) { System.Net.IPAddress[] addressList = Dns.GetHostByName(Dns.GetHostName()).AddressList; if ( addressList.Length>1) { TextLIP.Text = addressList[0].ToString(); TextSIP.Text = addressList[1].ToStri.. 阅读全文