How can I Compress a directory with .NET?

前端 未结 10 2717
孤街浪徒
孤街浪徒 2021-02-14 16:16

I have a directory that contains several files. I want compress this folder to a zip or tar.gz file. How can I do his work in C#?

10条回答
  •  情深已故
    2021-02-14 16:29

    Another pre-3.5 option is to use the zip utilities from J#. After all, .Net doesn't care what language the code was originally written in ;-).

    Articles on how to do this:

    • ASP-Alliance
    • MSDN
    • CodeProject
    • C-Sharp Corner

提交回复
热议问题