日期:2014-05-18 浏览次数:20928 次
using System.Net; IPHostEntry localHostEntry = Dns.GetHostByName(Dns.GetHostName()); for(int i=0;i<localHostEntry.AddressList.Length;i++) { cmbIP.Items.Add(localHostEntry.AddressList[i].ToString()); //把本机所有网卡(如:双网卡)的IP地址列出来 }