PeerCastStation.Core.AppSettingsReader.TryGetIPAddress C# (CSharp) Method

TryGetIPAddress() static public method

static public TryGetIPAddress ( string key, System &value ) : bool
key string
value System
return bool
    static public bool TryGetIPAddress(string key, out System.Net.IPAddress value)
    {
      try {
        var v = System.Configuration.ConfigurationManager.AppSettings[key];
        return System.Net.IPAddress.TryParse(v, out value);
      }
      catch (System.Configuration.ConfigurationException) {
        value = null;
        return false;
      }
    }