BF2Statistics.Net.Networking.TryGetIpAddress C# (CSharp) Method

TryGetIpAddress() public static method

Takes a domain name, or IP address, and returns the Correct IP address. If multiple IP addresses are found, the first one is returned
public static TryGetIpAddress ( string text, IPAddress &Ip ) : bool
text string
Ip System.Net.IPAddress
return bool
        public static bool TryGetIpAddress(string text, out IPAddress Ip)
        {
            try
            {
                Ip = GetIpAddress(text);
                return true;
            }
            catch
            {
                Ip = null;
                return false;
            }
        }