Encog.Persist.EncogFileSection.ParseDouble C# (CSharp) Method

ParseDouble() public static method

Parse a double from a name-value collection of params.
public static ParseDouble ( String>.IDictionary paras, String name ) : double
paras String>.IDictionary The name-value pairs.
name String The name to parse.
return double
        public static double ParseDouble(IDictionary<String, String> paras,
                                         String name)
        {
            String v = null;
            try
            {
                v = paras[name];
                if (v == null)
                {
                    throw new PersistError("Missing property: " + name);
                }

                return CSVFormat.EgFormat.Parse(v);
            }
            catch (FormatException )
            {
                throw new PersistError("Field: " + name + ", "
                                       + "invalid integer: " + v);
            }
        }