Hi I am trying to convert a method from writing a regular textfile to doing it in a zip file
Here's what I've tried:
void savepfc(string file)
MemoryStream fsOutput = new MemoryStream();
// FileStream fsOutput = new FileStream(file, FileMode.Create, FileAccess.Write);
StreamWriter srOutput = new StreamWriter(fsOutput);
*snips about 20 srOutput.WriteLines...
ZipStorer zipfile = ZipStorer.Create(file, "This is a product file");
zipfile.AddStream(ZipStorer.Compression.Deflate, "product.txt", fsOutput, DateTime.Now, "This is your product.");
But when I check the txt file inside the zip its got nothing in it.
I've not used memorystreams before. Are they different from filestreams?