title: How to work with a ZipArchive in C#
body: <p>I have a ZipArchive and am looking to access a file inside. I am not sure how I would do this, but I have a list</p>
  
  <pre><code>List&lt;ZipContents&gt; importList = new List&lt;ZipContents&gt;();
  </code></pre>
  
  <p>Which has two parameters: </p>
  
  <ol>
  <li><code>ZipArchive</code> which is called <code>ZipFile</code></li>
  <li><code>String</code> which is called <code>FileName</code></li>
  </ol>
  
  <p>Inside the <code>ZipArchive</code> which is <code>importList.ZipFile</code> I need to find an XML file that has the same name as the Zip file name. </p>
  
  <p>Currently I have this:</p>
  
  <pre><code>foreach (var import in importList)
  {
      var fn = import.FileName; // This is the actual file name of the zip file 
      // that was added into the ZipArchive. 
      // I will need to access the specific XML file need in the Zip by associating with
      // fn
  
      // ToDo: Extract XML file needed 
      // ToDo: Begin to access its contents...
  
  }
  </code></pre>
  
  <p>So for example the code is looking into the ZipArchive with the name <code>test.zip</code>. there will be a file called <code>test.xml</code> that I will then need to be able to access its contents.</p>
  
  <p>Like I said above I need to be able to access the contents of that file. I am sorry I have no code to support how to do this, but I have not been able to find anything else...</p>
  
  <p>I have looked through a lot of the ZIpArchive documentation (including: <a href="http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive%28v=vs.110%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive%28v=vs.110%29.aspx</a>) and other posts on SO on how to do this, but I have come up empty. Would anyone have an idea on how to do this? Any help would be much appreciated. Thanks!  </p>