public static DateTime DeserializeDateTime(byte[] buf, ref int bytePos)
        {
            long dateData = (long)Serialization.DeserializeUInt64(buf, ref bytePos);

            return(DateTime.FromBinary(dateData));
        }
        public static void SerializeDateTime(byte[] buf, ref int bytePos, DateTime val)
        {
            long val2 = val.ToBinary();

            Serialization.SerializeUInt64(buf, ref bytePos, (ulong)val2);
        }