コード例 #1
0
 /// <summary>
 ///     Writes a decimal value to the stream, using the bit converter for this writer.
 ///     16 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(decimal value)
 {
     BitConverter.CopyBytes(value, buffer, 0);
     WriteInternal(buffer, 16);
 }
コード例 #2
0
 /// <summary>
 ///     Writes a single-precision floating-point value to the stream, using the bit converter
 ///     for this writer. 4 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(float value)
 {
     BitConverter.CopyBytes(value, buffer, 0);
     WriteInternal(buffer, 4);
 }
コード例 #3
0
 /// <summary>
 ///     Writes a double-precision floating-point value to the stream, using the bit converter
 ///     for this writer. 8 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(double value)
 {
     BitConverter.CopyBytes(value, buffer, 0);
     WriteInternal(buffer, 8);
 }
コード例 #4
0
 /// <summary>
 ///     Writes a boolean value to the stream. 1 byte is written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(bool value)
 {
     BitConverter.CopyBytes(value, buffer, 0);
     WriteInternal(buffer, 1);
 }
コード例 #5
0
 /// <summary>
 ///     Writes a 16-bit unsigned integer to the stream, using the bit converter
 ///     for this writer. 2 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(ushort value)
 {
     BitConverter.CopyBytes(value, buffer, 0);
     WriteInternal(buffer, 2);
 }
コード例 #6
0
 /// <summary>
 /// Writes a 64-bit unsigned integer to the stream, using the bit converter
 /// for this writer. 8 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(ulong value)
 {
     BitConverter.CopyBytes(value, _buffer, 0);
     WriteInternal(_buffer, 8);
 }
コード例 #7
0
 /// <summary>
 /// Writes a 32-bit signed integer to the stream, using the bit converter
 /// for this writer. 4 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public void Write(int value)
 {
     BitConverter.CopyBytes(value, _buffer, 0);
     WriteInternal(_buffer, 4);
 }
コード例 #8
0
 /// <summary>
 ///     Writes a decimal value to the stream, using the bit converter for this writer.
 ///     16 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public virtual void Write(decimal value)
 {
     BitConverter.CopyBytes(value, _buffer, 0);
     writeInternal(_buffer, 16);
 }
コード例 #9
0
 /// <summary>
 ///     Writes a double-precision floating-point value to the stream, using the bit converter
 ///     for this writer. 8 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public virtual void Write(double value)
 {
     BitConverter.CopyBytes(value, _buffer, 0);
     writeInternal(_buffer, 8);
 }
コード例 #10
0
 /// <summary>
 ///     Writes a single-precision floating-point value to the stream, using the bit converter
 ///     for this writer. 4 bytes are written.
 /// </summary>
 /// <param name="value">The value to write</param>
 public virtual void Write(float value)
 {
     BitConverter.CopyBytes(value, _buffer, 0);
     writeInternal(_buffer, 4);
 }