954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to extract the rar or zip file using C#

hi,

i am doing a project using C#. i am new to this area.

the task is to extract the zip or rar file using C#.

in my windows form have a text box and button in the form. i will give the zip or rar file. when i click that button. it must automatically extract the file and shows contents of that file in to the other form or file..

i don't know how to extract that zip or rar file using C#.

if u know please share your idea.

thegreatkk
Newbie Poster
19 posts since Feb 2009
Reputation Points: 10
Solved Threads: 0
 

In the past I have used SharpZipLib

http://www.icsharpcode.net/OpenSource/SharpZipLib/

dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143
 

You need to use

System.IO.Compression namespace.

jbrock31
Junior Poster in Training
79 posts since Oct 2008
Reputation Points: 22
Solved Threads: 16
 

You need to use

System.IO.Compression namespace.

...But that only handles ZIP files. RAR files will have to be done with something else, like this DLL: http://www.example-code.com/csharp/rar_unrar.asp

This won't create RAR files, but it will list and extract.

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

Thank you boss.

thegreatkk
Newbie Poster
19 posts since Feb 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You