Answers for "how to extract a zip file in c#"

C#
3

how to extract a zip file in c#

using System;
using System.IO.Compression;

class Program
{
    static void Main(string[] args)
    {
        string startPath = @".\start";
        string zipPath = @".\result.zip";
        string extractPath = @".\extract";

        ZipFile.CreateFromDirectory(startPath, zipPath);

        ZipFile.ExtractToDirectory(zipPath, extractPath);
    }
}
Posted by: Guest on May-14-2020

Code answers related to "how to extract a zip file in c#"

C# Answers by Framework

Browse Popular Code Answers by Language