SwapUInt64() public static method

public static SwapUInt64 ( ulong v ) : ulong
v ulong
return ulong
Ejemplo n.º 1
0
        /// <summary>
        /// Reads a ulong from the underlying stream.
        /// </summary>
        /// <returns>A ulong.</returns>
        public ulong ReadUInt64()
        {
            lock (m_Reader)
            {
                if (Endian.IsBigEndian != m_IsBigEndian)
                {
                    return(Endian.SwapUInt64(m_Reader.ReadUInt64()));
                }

                return(m_Reader.ReadUInt64());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes a ulong to the underlying stream.
        /// </summary>
        /// <returns>A ulong.</returns>
        public void WriteUInt64(ulong Val)
        {
            lock (m_Writer)
            {
                if (Endian.IsBigEndian != m_IsBigEndian)
                {
                    Endian.SwapUInt64(Val);
                    m_Writer.Write(Val);

                    return;
                }

                m_Writer.Write(Val);
            }
        }