SwapUInt64() public static méthode

public static SwapUInt64 ( ulong v ) : ulong
v ulong
Résultat ulong
        /// <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());
            }
        }
Exemple #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);
            }
        }