728x90
            string localIP = String.Empty;

            foreach (IPAddress ip in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
            {
                if (ip.AddressFamily.ToString().ToUpper().Equals("INTERNETWORK"))
                    localIP = ip.ToString();
            }

            return localIP;

728x90
Posted by kjun.kr
,