[
  {
    "Id": "121063",
    "ThreadId": "36499",
    "Html": "<p>I am creating zip files using your library very easily.&nbsp; But when I try to read and extract them I always get a null reference exception.&nbsp; Perhaps you can tell me what is wrong with the following code?&nbsp; I have tried reading both the filestream as well as just passing the path of the zip file but it is not working!&nbsp; Please help.<br>\r\n<br>\r\n<span style=\"font-size:13px\">FileStream</span> <span style=\"font-size:13px\">fs = </span><span style=\"font-size:13px;color:#0000ff\"><span style=\"font-size:13px;color:#0000ff\">new</span></span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">FileStream</span></span><span style=\"font-size:13px\">(tempFolder + </span><span style=\"font-size:13px;color:#a31515\"><span style=\"font-size:13px;color:#a31515\">&quot;\\\\&quot;</span></span><span style=\"font-size:13px\"> + fileinfo[0], </span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">FileMode</span></span><span style=\"font-size:13px\">.Open, </span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">FileAccess</span></span><span style=\"font-size:13px\">.Read); <br>\r\n</span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">ZipFile</span></span><span style=\"font-size:13px\"> zipFile = </span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">ZipFile</span></span><span style=\"font-size:13px\">.Read(fs);&nbsp;<br>\r\nzipFile.Extract(installPath, </span><span style=\"font-size:13px;color:#0000ff\"><span style=\"font-size:13px;color:#0000ff\">true</span></span><span style=\"font-size:13px\">);\r\n<p>&nbsp;</p>\r\n<p>\r\n<p>&nbsp;</p>\r\n<p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p>&nbsp;</p>\r\n<p>\r\n<p>&nbsp;</p>\r\n<p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2008-09-25T15:01:48.177-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "121073",
    "ThreadId": "36499",
    "Html": "I resolved this.&nbsp; Would help to read the documentation a bit before diving in.&nbsp; Here is the code that works...<br>\r\n<br>\r\n<span style=\"font-size:13px;color:#0000ff\"><span style=\"font-size:13px;color:#0000ff\">\r\n<p>using</p>\r\n</span>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px\"> (</span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">ZipFile</span></span><span style=\"font-size:13px\"> zipFile = </span><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">ZipFile</span></span><span style=\"font-size:13px\">.Read(tempFolder + </span><span style=\"font-size:13px;color:#a31515\"><span style=\"font-size:13px;color:#a31515\">&quot;\\\\&quot;</span></span><span style=\"font-size:13px\"> + fileinfo[0]))\r\n<p>&nbsp;</p>\r\n<p>{</p>\r\n<p>zipFile[fileinfo[1]].Extract(</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#2b91af\"><span style=\"font-size:13px;color:#2b91af\">Application</span></span><span style=\"font-size:13px\">.StartupPath, </span><span style=\"font-size:13px;color:#0000ff\"><span style=\"font-size:13px;color:#0000ff\">true</span></span><span style=\"font-size:13px\">);\r\n<p>&nbsp;</p>\r\n<p>}</p>\r\n</span></p>\r\n",
    "PostedDate": "2008-09-25T16:28:00.04-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]