Skip to content

Instantly share code, notes, and snippets.

@belchev
Created November 11, 2015 10:55
Show Gist options
  • Save belchev/24d6c06bdbaea6799383 to your computer and use it in GitHub Desktop.
Save belchev/24d6c06bdbaea6799383 to your computer and use it in GitHub Desktop.
Save memoryStream to local, when memorystream is already once read.
using (var fileStream = new FileStream(@"C:\Temp\test.zip", FileMode.Create))
{
memoryStream.Seek(0, SeekOrigin.Begin);
memoryStream.CopyTo(fileStream);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment