Пример #1
0
        /// <summary>
        /// Appends the bytes to <see cref="Stream"/>.
        /// </summary>
        /// <param name="stream">The stream.</param>
        public void AppendBytesTo(Stream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            stream.AppendBytes(TypeCode, ByteTool.GetRawBytes(BitConverter.GetBytes(_int), _int < 0));
        }
Пример #2
0
 /// <summary>
 /// Gets that raw bytes.
 /// </summary>
 /// <returns></returns>
 internal byte[] GetRaw()
 {
     return(ByteTool.GetRawBytes(BitConverter.GetBytes(_count), false));
 }