Gets the collection of entries that are currently in the zip archive.
Assembly: System.IO.Compression (in System.IO.Compression.dll)
Use the property to retrieve the entire collection of entries. Use the GetEntry method to retrieve a single entry by name.
The following example shows how to open a zip archive and iterate through the collection of entries.
Imports System.IO Imports System.IO.Compression Module Module1 Sub Main() Dim zipPath As String = "c:\example\start.zip" Dim extractPath As String = "c:\example\extract" Using archive As ZipArchive = ZipFile.OpenRead(zipPath) For Each entry As ZipArchiveEntry In archive.Entries If entry.FullName.EndsWith(".txt", StringComparison.OrdinalIgnoreCase) Then entry.ExtractToFile(Path.Combine(extractPath, entry.FullName)) End If Next End Using End Sub End Module
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.