title: Replace a file with the same name in zip
body: <p>I have a code that creates or adds files to a zip archive specified. What I can't find is the option to replace file in zip if I'm trying to add another one with same name.</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
          if (oflFilesToZip.ShowDialog() == DialogResult.OK)
          {
              string[] files = oflFilesToZip.FileNames;
              bool zipExists = File.Exists(zipPath);
  
              ZipArchive zip;
              if (zipExists)
              {
                  zip = ZipFile.Open(zipPath, ZipArchiveMode.Update);
              }
              else zip = ZipFile.Open(zipPath, ZipArchiveMode.Create);
  
              foreach (string file in files)
              {
                  zip.CreateEntryFromFile(file, Path.GetFileName(file), CompressionLevel.Optimal);                   
              }
              zip.Dispose();
  
          }
      }
  </code></pre>
  
  <p>Is there any method for that, or do I have to for example manually open the zip, get all entries and check one by one if the filename I'm adding already exists within the zip?</p>