GSF.IO.BinaryStreamBase.WriteUInt C# (CSharp) Method

WriteUInt() public method

Writes the specifed value to the underlying stream in little-endian format.
public WriteUInt ( ulong value, int bytes ) : void
value ulong the value to write
bytes int the number of bytes to write.
return void
        public void WriteUInt(ulong value, int bytes)
        {
            switch (bytes)
            {
                case 0:
                    return;
                case 1:
                    Write((byte)value);
                    return;
                case 2:
                    Write((ushort)value);
                    return;
                case 3:
                    WriteUInt24((uint)value);
                    return;
                case 4:
                    Write((uint)value);
                    return;
                case 5:
                    WriteUInt40(value);
                    return;
                case 6:
                    WriteUInt48(value);
                    return;
                case 7:
                    WriteUInt56(value);
                    return;
                case 8:
                    Write(value);
                    return;
            }
            throw new ArgumentOutOfRangeException("bytes", "must be between 0 and 8 inclusive.");
        }
        /// <summary>