This question is a follow up question of
Read binary file from a zip file from C# without unzipping it
After read the bin file from the zip file, I read it and make some changes to the data (id1, id2, value1) and then write to a new memorystream.
Then, in C#, I remove the zipentry from the zip file and add the new memorystream as a zip entry with the same name.
// read data and made changes, then write to a MemoryStream called myms
MemoryStream myms = new MemoryStream();
// then
ZipFile.RemoveEntry(binFileName); // remove the file with non-normalized rm factors
ZipFile.AddEntry("subFolder/" + binFileName, myms.ToArray());
After all is done, I manually unzipped the zip file and found that the date and time of the binFile is still the time when it was created one week ago not the new time where it was replaced.
How to make sure that the new data has been written to the binFile ?