-
新手上路
-
在线付款
-
相关服务
-
新闻动态
-
关于我们
C#获取本地电脑的IP地址
//获取本地的IP地址 string AddressIP = string.Empty; foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).AddressList) { if (_IPAddress.AddressFamily.ToString() == "InterNetwork") { AddressIP = _IPAddress.ToString(); } } Response.Write(AddressIP);