网站首页 站内搜索

搜索结果

查询Tags标签: AddressFamily,共有 2条记录
  • C# 获取 IPv4

    实现代码:public static string GetLocalIPAddress() {var host = Dns.GetHostEntry(Dns.GetHostName());foreach (var ip in host.AddressList){if (ip.AddressFamily == AddressFamily.InterNetwork){return ip.ToString();}}return ""; }

    2021/9/17 17:05:13 人评论 次浏览
  • C# 获取 IPv4

    实现代码:public static string GetLocalIPAddress() {var host = Dns.GetHostEntry(Dns.GetHostName());foreach (var ip in host.AddressList){if (ip.AddressFamily == AddressFamily.InterNetwork){return ip.ToString();}}return ""; }

    2021/9/17 17:05:13 人评论 次浏览
扫一扫关注最新编程教程