MemoryStream.WriteTo Method

May 11, 2014

Writes the entire contents of this memory stream to another stream.

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

public virtual void WriteTo(
	Stream stream
)

Parameters

stream
Type: System.IO.Stream
The stream to write this memory stream to.

ExceptionCondition
ArgumentNullException

stream is null.

ObjectDisposedException

The current or target stream is closed.

When the current stream is open, this method is equivalent to calling Stream.Write on the underlying buffer of this stream.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft