Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size, cancellation token, and progress reporting delegate.
The stream to copy from.
The stream to copy to.
The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920.
The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.
Delegate which will be invoked periodically with the number of bytes copied so far as its argument.
A task that represents the asynchronous copy operation.
source is null (Nothing in Visual Basic) or destination is null (Nothing in Visual Basic).
bufferSize is negative or zero.
Either the source stream or the destination stream is disposed.
The source stream does not support reading, or the destination stream does not support writing.