This documentation is archived and is not being maintained.

BufferedStream.WriteByte Method

Writes a byte to the current position in the buffered stream.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal value As Byte _
public override void WriteByte(
 byte value
public: void WriteByte(
 unsigned char value
public override function WriteByte(
   value : Byte


A byte to write to the stream.


Exception Type Condition
NotSupportedException The stream does not support writing.
ArgumentNullException value is a null reference (Nothing in Visual Basic).
ObjectDisposedException Methods were called after the stream was closed.


For an example of creating a file and writing text to a file, see Writing Text to a File. For an example of reading text from a file, see Reading Text from a File. For an example of reading from and writing to a binary file, see Reading and Writing to a Newly Created Data File.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

BufferedStream Class | BufferedStream Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File