Exemple #1
0
        protected internal override DateTime Read(ContentReader input, DateTime existingInstance)
        {
            ulong num1 = input.ReadUInt64();
            ulong num2 = 13835058055282163712UL;

            return(new DateTime((long)num1 & ~(long)num2, (DateTimeKind)((long)(num1 >> 62) & 3L)));
        }
        protected internal override DateTime Read(ContentReader input, DateTime existingInstance)
        {
            UInt64       value = input.ReadUInt64();
            UInt64       mask  = (UInt64)3 << 62;
            long         ticks = (long)(value & ~mask);
            DateTimeKind kind  = (DateTimeKind)((value >> 62) & 3);

            return(new DateTime(ticks, kind));
        }
 protected internal override ulong Read(ContentReader input, ulong existingInstance)
 {
     return(input.ReadUInt64());
 }