【C#学习笔记】获得本机IP
2021-09-10 15:12
标签:void lis stat ace res str style ram logs using System; using System.Net; namespace ConsoleApplication { class Program { static void Main(string[] args) { IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName()); //v6地址 // IPHostEntry ipHost = Dns.GetHostByName(Dns.GetHostName()); //v4地址 IPAddress ipAddr = ipHost.AddressList[0]; Console.Write(ipAddr.ToString()); Console.Read(); } } } 【C#学习笔记】获得本机IP标签:void lis stat ace res str style ram logs 原文地址:http://www.cnblogs.com/tiandsp/p/7440436.html
上一篇:html5_延迟(defer)脚本与异步(async)脚本
下一篇:数组index