All pastes #2100403 Raw Edit

Untitled

public text v1 · immutable
#2100403 ·published 2012-01-06 13:58 UTC
rendered paste body
private string getHostIP()
        {
            IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());
            foreach (IPAddress ip in host.AddressList)
            {
                if (ip.AddressFamily == AddressFamily.InterNetwork)
                {
                    return ip.ToString();
                }
            }

            return null;
        }