Azavea.Open.Common.Config.GetParameterAsDouble C# (CSharp) Method

GetParameterAsDouble() public method

Similar to GetParameter, but converts the type for you (if possible, throws if not).
public GetParameterAsDouble ( string component, string parameter ) : double
component string The component or section of the config file, used to /// locate the parameter.
parameter string The name of the config parameter.
return double
        public double GetParameterAsDouble(string component, string parameter)
        {
            double retVal;
            if (!double.TryParse(GetParameter(component, parameter), out retVal))
            {
                throw new LoggingException("Component " + component + ", parameter " +
                    parameter + ", value was unable to be converted to a double.");
            }
            return retVal;
        }

Same methods

Config::GetParameterAsDouble ( string component, string parameter, double defaultValue ) : double
Config::GetParameterAsDouble ( string component, string parameter, double defaultValue ) : double?