public void Write(Double value) { V64 v = default(V64); v.D = value; Write(v.Reverse); //Reverse后可能得到更小的值 }
public void Write(TimeSpan value) { V64 v = default(V64); v.TS = value; Write(v.I64); }
public TimeSpan ReadTimeSpan() { V64 v = default(V64); v.I64 = ReadInt64(); return(v.TS); }
public double ReadDouble() { V64 v64 = default(V64); v64.U64 = ReadUInt64(); v64.U64 = v64.Reverse; return(v64.D); }
public void Write(DateTime value) { V64 v = default(V64); long dt = value.Ticks | (long)value.Kind << 0x3e; v.I64 = dt; Write(v.B0); Write(v.B1); Write(v.B2); Write(v.B3); Write(v.B4); Write(v.B5); Write(v.B6); Write(v.B7); }
public DateTime ReadDateTime() { V64 v = default(V64); v.B0 = ReadByte(); v.B1 = ReadByte(); v.B2 = ReadByte(); v.B3 = ReadByte(); v.B4 = ReadByte(); v.B5 = ReadByte(); v.B6 = ReadByte(); v.B7 = ReadByte(); DateTime result = new DateTime(v.I64 & 0x3fffffffffffffffL, (DateTimeKind)((ulong)v.I64 >> 0x3e)); return(result); }