string GetIP4Address() { string IP4Address = String.Empty; foreach (IPAddress IPA in Dns.GetHostAddresses(Dns.GetHostName())) { if (IPA.AddressFamily.ToString() == "InterNetwork") { IP4Address = IPA.ToString(); break; } } return IP4Address; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)