var = comboBox1.SelectedItem.ToString(); fullpath = fbd.SelectedPath + "\\"+ var; comboBox2.Items.Clear(); if (File.Exists(fullpath)) { ZipArchive zip = ZipFile.OpenRead(fullpath); MessageBox.Show(Directory.EnumerateFileSystemEntries(fullpath, "*.csv").ToList<string>().Count + " csv file(s) present"); // get error here foreach (ZipArchiveEntry entry in zip.Entries) { comboBox2.Items.Add(entry.FullName); // fill comboBox2 with *.csv files from selected zip file } zip.Dispose(); } else { MessageBox.Show("no csv file(s) present"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)