C#获得本机ip地址

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

string s="";
System.Net.IPAddress[] addressList = Dns.GetHostByName(Dns.GetHostName()).AddressList; 
for (int i = 0; i < addressList.Length; i ++)
{
s += addressList[i].ToString();
}