SwapUInt64() публичный статический Метод

public static SwapUInt64 ( ulong v ) : ulong
v ulong
Результат ulong
Пример #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());
            }
        }
Пример #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);
            }
        }