How do I copy the contents of one stream to another?
From .NET 4.5 on, there is the Stream.CopyToAsync method input.CopyToAsync(output); This will return a Task that can be continued on when completed, like so: await input.CopyToAsync(output) // Code from here on will be run in a continuation. Note that depending on where the call to CopyToAsync is made, the code that follows may or may … Read more