title: How to Extract A RAR file selected by dialogbox
body: <p>I have a code in C# to extract a zip file to a specific folder.
  I want to extract a RAR file from that code.
  I tried some other things like 7-zip, IO.Compression but it was not suitable for me.
  here is the code which I used to extract the zip file.</p>
  
  <pre><code>DialogResult result = openFileDialog1.ShowDialog();
              if (result == DialogResult.OK)
              {
                  ZipFile.ExtractToDirectory(openFileDialog1.FileName, "TestFolder"); 
                  MessageBox.Show("ZIP file extracted successfully!");
              }
  </code></pre>
  
  <p>what I want, is like this.
  When a user selects a Zip or RAR file this code extract the respected file in the pre-specified folder.
  This is a windows form Application.
  Please help. 
  Any help is welcome.
  Thanks</p>