When trying the following I get the error "Collection was modified; enumeration operation may not execute.". How can I loop through Zip entries and update them?
using (ZipArchive archive = ZipFile.Open(@"c:\file.zip",ZipArchiveMode.Update))
{
foreach (ZipArchiveEntry entry in archive.Entries)
{
archive.CreateEntryFromFile(@"c:\file.txt", entry.FullName);
}
}