System.IO.Stream.CopyTo Method

Reads the bytes from the current stream and writes them to another stream.

Syntax

public void CopyTo (Stream destination)

Parameters

destination
The stream to which the contents of the current stream will be copied.

Remarks

Copying begins at the current position in the current stream, and does not reset the position of the destination stream after the copy operation is complete.

Requirements

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