Can I please have some help in getting a list of all the items in a ZipArchive.
Here is my code:
And I use it like this:Code:Public Function returnListOfAllFilesInZipArchive(stringArchiveName As String) As List(Of ZipArchiveEntry) Dim zipArchiveEntryList As List(Of ZipArchiveEntry) Using archive As ZipArchive = ZipFile.Open(stringArchiveName, ZipArchiveMode.Update) For Each entry As ZipArchiveEntry In archive.Entries zipArchiveEntryList.Add(entry) Next End Using Return zipArchiveEntryList End Function
I am getting an error at:Code:Dim listOfZipEntries As List(Of ZipArchiveEntry) = returnListOfAllFilesInZipArchive(archiveFileName)
Code:zipArchiveEntryList.Add(entry)Do I need to identify each entry individually before adding it to the list?Object reference not set to an instance of an object.


Reply With Quote

