title: Zip and Unzip file
body: <p>I'm working on a project that needed to unzip file and store in a specific folder. But the problem is, I don't know how to do it. It is my first time to work on this kind of project.</p>
  
  <p>I'm using visual studio 2010. And I'm not gonna use any third party applications.</p>
  
  <p>Can anyone suggest how could I do this?</p>
  
  <p>i've tried this code but the ZIPFILE is not recognizable. It has a red line on it.</p>
  
  <pre><code>using System;
  using System.IO;
  using System.IO.Compression;
  
  namespace UnzipFile
  {
  /// &lt;summary&gt;
  /// Interaction logic for MainWindow.xaml
  /// &lt;/summary&gt;
  public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
      }
  
      private void btnZip_Click(object sender, RoutedEventArgs e)
      {
          string startPath = @"c:\example\start";
          string zipPath = @"c:\example\result.zip";
          string extractPath = @"c:\example\extract";
  
          ZipFile.CreateFromDirectory(startPath, zipPath);
  
          ZipFile.ExtractToDirectory(zipPath, extractPath);
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><img src="https://i.stack.imgur.com/wGEoE.png" alt="enter image description here"></p>