Listing ZIP contents

suggest change

This snippet will list all the filenames of a zip archive. The filenames are relative to the zip root.

using (FileStream fs = new FileStream("", FileMode.Open))
using (ZipArchive archive = new ZipArchive(fs, ZipArchiveMode.Read))
    for (int i = 0; i < archive.Entries.Count; i++)
        Console.WriteLine($"{i}: {archive.Entries[i]}");

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents