具体方法为如下: private void btnChenk_Click(object sender, System.EventArgs e) { System.Net.IPAddress[] addressList = Dns.GetHostByName(Dns.GetHostName()).AddressList; if ( addressList.Length>1) { nativeIP.Text = addressList[0].ToString(); serverIP.Text = addressList[1].ToString(); } else { nativeIP.Text = addressList[0].ToString(); serverIP.Text = "Break the li...
[ 查看全文 ]