/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }