c# clone stream

C#
//Copy the bytes from a source stream to a destination stream.
sourceStream.CopyTo(destinationStream);

//NB you may want to reset the streams position
sourceStream.Seek(0, SeekOrigin.Begin);
destinationStream.Seek(0, SeekOrigin.Begin);
Source

Also in C#: