Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MemoryStream.WriteByte Method

Writes a byte to the current stream at the current position.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public override void WriteByte(
	byte value
)

Parameters

value
Type: System.Byte
The byte to write.

ExceptionCondition
NotSupportedException

The stream does not support writing. For additional information see CanWrite.

-or-

The current position is at the end of the stream, and the capacity cannot be modified.

ObjectDisposedException

The current stream is closed.

This method overrides WriteByte.

Except for a MemoryStream constructed with a byte[] parameter, write operations at the end of a MemoryStream expand the MemoryStream.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2015 Microsoft