title: C# -Make a zip file from List of file paths
body: <p>I have a number of folders and I have number of file in each folders.
  I am taking some of the file paths from different folders and I need to zip those files into a single zip file.</p>
  
  <p>if I have the file in a single folder, I can do zip using</p>
  
  <pre><code>string startPath = @"c:\example\start";//folder to add
  string zipPath = @"c:\example\result.zip";//URL for your ZIP file
  ZipFile.CreateFromDirectory(startPath, zipPath, CompressionLevel.Fastest, true);
  string extractPath = @"c:\example\extract";//path to extract
  ZipFile.ExtractToDirectory(zipPath, extractPath);
  using (ZipArchive newFile = ZipFile.Open(zipName, ZipArchiveMode.Create))
  {
      foreach (string file in Directory.GetFiles(myPath))
      {
          newFile.CreateEntryFromFile(file);
      }
  }
  </code></pre>
  
  <p>Suppose I don't know about the folders, I only have a list of file paths, I need to foreach through each file path and add into the zip. What should I do for this?</p>