To open a zip file in c#, you can use the System.IO.Compression.ZipFile
class in the .NET framework. To open a zip file, you must first create an instance of the ZipArchive
class:
main.cs93 chars4 lines
Once you have an instance of the ZipArchive
class, you can navigate the contents of the archive using the Entries
property:
main.cs90 chars5 lines
You can decompress the contents of each entry using the Open
method:
main.cs156 chars8 lines
When you're done working with the archive, be sure to close it:
main.cs47 chars2 lines
gistlibby LogSnag