Asad Hasnaini Asad Hasnaini - 1 year ago 139
C# Question

How to unrar an archive in dotnet core?

Is there a library builtin that could be used to extract

rar
files in dotnet core? I found something to extract zip files, but nothing for
rar
files. Used 7zip in 4.5

Answer Source

The ZipFile class from System.IO.Compression supports both .zip and .rar archives.

You can open an archive like this:

using(ZipArchive za = ZipFile.OpenRead(strPath))  
{
    //do something with `za.Entries` or with other properties
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download