c#获取本机的IP地址的代码
fhxfhx
7
0
PDF
2021-02-27 11:02:08
代码如下:public static IPAddress GetHostIP(){ IPHostEntry ipe = Dns.GetHostEntry(Dns.GetHostName()); IPAddress ip = ipe.AddressList[0]; return ip;} private String GetIPAddress(){ String str; String Result = “”; String hostName = Dns.GetH
暂无评论