Stream.CopyTo Method (Stream, Int32)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Reads all the bytes from the current stream and writes them to a destination stream, using a specified buffer size.
Assembly: mscorlib (in mscorlib.dll)
destination is null.
bufferSize is negative or zero.
The current stream does not support reading.
destination does not support writing.
Either the current stream or destination were closed before the CopyTo method was called.
An I/O error occurred.