ParseDouble() public static method

Attempt to parse a string representation of a double.
public static ParseDouble ( string value ) : double
value string
return double
Example #1
0
        public static double ReadDouble(NetworkBinaryReader reader)
        {
            object value = ReadNonnullObject("double", reader);

            if (value is double || value is float)
            {
                return((double)value);
            }
            if (value is string)
            {
                return(PrimitiveParser.ParseDouble((string)value));
            }
            throw PrimitiveParser.CreateProtocolViolationException("double", value);
        }
        public static double ReadDouble(NetworkBinaryReader reader)
        {
            object value = ReadNonnullObject("double", reader);

            if (value is double || value is float)
            {
                return((double)value);
            }
            if (value is string)
            {
                return(PrimitiveParser.ParseDouble((string)value));
            }
            PrimitiveParser.InvalidConversion("double", value);
            return(0);
        }