c# Extracting Rar File,Facing Error while Decompress a Rar

Mar 13 2018 5:26 AM
It shows a Invalid RarHeader:16 ,I also try in Nunrar,sevenzip extractor,chilkat,It shows the same Error,But it Extracted in Winrar and 7zip softwares
 
String filename = @"" + textBox8.Text;
string ppath = @"" + System.IO.Path.GetDirectoryName(textBox8.Text) + "\\" + System.IO.Path.GetFileNameWithoutExtension(textBox8.Text);
System.IO.Directory.CreateDirectory(@"" + ppath);
try
{
var archive = SharpCompress.Archives.Rar.RarArchive.Open(filename);
foreach (var entry in archive.Entries.Where(entry => !entry.IsDirectory))
{
entry.WriteToDirectory(ppath, new ExtractionOptions()
{
});
}
}catch(Exception ex)
{
textBox10.Text = Convert.ToString(ex);
}

Answers (1)