Exemplo n.º 1
0
        /// <summary>
        /// Gets the <see cref="ulong"/> value at a given index.
        /// </summary>
        /// <param name="index"> index in bytes from which to get.</param>
        /// <returns>the value at a given index.</returns>
        public ulong Uint64GetBigEndian(int index)
        {
            var data = *(ulong *)(_pBuffer + index);

            data = EndianessConverter.ApplyUint64(ByteOrder.BigEndian, data);

            return(data);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Writes a <see cref="ulong"/> value to a given index.
        /// </summary>
        /// <param name="index">index in bytes for where to put.</param>
        /// <param name="value">value to be written</param>
        public void Uint64PutBigEndian(int index, ulong value)
        {
            value = EndianessConverter.ApplyUint64(ByteOrder.BigEndian, value);

            *(ulong *)(_pBuffer + index) = value;
        }