获取本机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
转载源于:http://cdiso.cn/article/iidccj.html