コード例 #1
0
        /// <summary>
        /// Read data from stream
        /// </summary>
        /// <param name="s">stream</param>
        /// <returns>data of specified type</returns>
        public static ulong ToUInt64(Stream s)
        {
            byte[] buf = GetBytes(s, sizeof(ulong));

            return(LittleEndianBitConverter.ToUInt16(buf, 0));
        }
コード例 #2
0
        /// <summary>
        /// Read data from stream
        /// </summary>
        /// <param name="s">stream</param>
        /// <returns>data of specified type</returns>
        public static uint ToUInt32(Stream s)
        {
            byte[] buf = GetBytes(s, sizeof(uint));

            return(LittleEndianBitConverter.ToUInt16(buf, 0));
        }