ip주소찾기1 [C#] 로컬 IP 주소 구하기 [C#] 로컬 IP 주소 구하기 How to get ip address in C# using System.Net; private void ShowIP() { IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); string IP4Addr = string.Empty; foreach (Ipaddress ip in host.AddressList) { if (ip.AddressFamily == AddressFamily.InterNetwork) { ip4Addr = ip.ToString(); Console.WriteLine(ip4Addr); } } } 2019. 8. 27. 이전 1 다음