public static bool DeleteEntry(string zipFileName, string entryname, string password = null) { try { SharpZipLib.Zip.ZipFile s = new SharpZipLib.Zip.ZipFile(zipFileName); s.Password = password; SharpZipLib.Zip.ZipEntry entry = s.GetEntry(entryname); if (null == entry) { s.Close(); return(true); } s.BeginUpdate(); s.Delete(entry); s.CommitUpdate(); s.Close(); return(true); } catch (Exception e) { LogUtil.LogError(e.Message); return(false); } }