Пример #1
0
        static bool TryParseDouble(byte[] blob, out double value)
        {
            // simple integer?
            if (blob.Length == 1 && blob[0] >= '0' && blob[0] <= '9')
            {
                value = blob[0] - '0';
                return(true);
            }

            return(Format.TryParseDouble(Encoding.UTF8.GetString(blob), out value));
        }
Пример #2
0
 internal bool TryGetDouble(out double val)
 {
     if (arr == null)
     {
         val = 0;
         return(false);
     }
     if (TryGetInt64(out long i64))
     {
         val = i64;
         return(true);
     }
     return(Format.TryParseDouble(GetString(), out val));
 }