获取本机ip
///
/// 获取本机ip
///
///
public static string getLocalIP()
{
string strHostName = DNS.GetHostName(); //得到本机的主机名
IPHostEntry ipEntry = Dns.GetHostByName(strHostName); //取得本机IP
string strAddr = ipEntry.AddressList[0].ToString();
return (strAddr);
}
/// 获取本机ip
///
///
public static string getLocalIP()
{
string strHostName = DNS.GetHostName(); //得到本机的主机名
IPHostEntry ipEntry = Dns.GetHostByName(strHostName); //取得本机IP
string strAddr = ipEntry.AddressList[0].ToString();
return (strAddr);
}
文章题目:获取本机ip
URL地址:http://myzitong.com/article/iidccj.html