查看归档条目 When extracting archives, developers sometimes want to do a quick inspection to confirm whether an entry exists within the archive, as extracting an archive can be costly at times. IronZIP lets you view the archive entries within the archive without extracting them first, saving you time and allowing you to inspect and verify files quickly before extracting them. Within this example, we'll quickly go through an example of utilizing the Entry class within IronZipArchive to obtain the list of entries within the archive and print out the names of the entries for inspection. View Archvie Entries with C# using IronZip; using (var archive = new IronZipArchive("existing.zip")) List entries = archive.Entries(); foreach (Entry entry in entries) Console.WriteLine(entry.Name); Importing Existing Archive We first import the namespace IronZip. Afterwards, we initialize a new IronZipArchive with the path to the ZIP Archive as the parameter to load the archive. Viewing The Contents of the Archive After importing the ZIP archive, we can utilize the class properties of IronZipArchive to obtain the list of entries within the archive. The Entries property within the IronZipArchive returns a of Entry within the archive. Entry Property The Entry property contains several properties such as the name, size, version, and other properties such as comments and the encryption method used to create that entry. In this example, we utilize a for loop to loop over the number of entries within the list to print out all the names of the entries within the archive, showcasing the versatility of looking through the entries without extracting them. For a complete list of properities available for the class Entry, please refer here. Learn to Create, Read & Extract ZIP Files with IronZip 相关文档链接 在Github上查看 相关教程 相关操作指南 类文档 下载IronZIP DLL 报告此页面的问题 准备开始了吗? Nuget 下载 16,000 | 版本: 2025.11 刚刚发布 免费 NuGet 下载 总下载量:16,000 查看许可证