摘要:
codepublicstaticIPAddressGetHostIP(){IPHostEntryipe=Dns.GetHostEntry(Dns.GetHostName());IPAddressip=ipe.AddressList[0];returnip;}privateStringGetIPAddress(){Stringstr;StringResult="";StringhostName=Dns.GetHostName();IPAddress[]myIP=Dns.GetHostAddresses(hostName);foreach(IPAddressaddressinm 阅读全文