查看存檔條目 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 查看許可證