Exemplo n.º 1
0
        /// <summary>
        /// Gets the <see cref="long"/> 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 long Int64GetBigEndian(int index)
        {
            var data = *(long *)(_pBuffer + index);

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

            return(data);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Writes a <see cref="long"/> 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 Int64PutBigEndian(int index, long value)
        {
            value = EndianessConverter.ApplyInt64(ByteOrder.BigEndian, value);

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