title: Expression denotes a `method group', where a `variable', `value' or `type' was expected
body: <p>I have a project which stores files from Unity project. What I want is to locate those files and to zip them. I want to use <a href="https://msdn.microsoft.com/en-us/library/hh485721(v=vs.110).aspx" rel="nofollow">ZipFile Class</a>. My code is very simple is the following:</p>
  
  <pre><code>string dataSource = @"D:\\dt\\2015-11-09-11\\";
  string zipFile = @"D:\\dt\\2015-11-09-11\\file.zip";
  ZipFile.CreateFromDirectory(dataSource, zipFile, CompressionLevel.Fastest, true);
  </code></pre>
  
  <p>However I am getting the error from unity:</p>
  
  <blockquote>
    <p>Assets/file.cs(54,25): error CS0119: Expression denotes a <code>method group', where a</code>variable', <code>value' or</code>type' was expected</p>
  </blockquote>
  
  <p>What I am doing wrong here?</p>
  
  <p>EDIT: Ths issue was that ZipFile class is for .NET 4.5 and higher while unity is for .NET 3.5. I change the library I used as suggested in the commnets  the following <a href="https://github.com/icsharpcode/SharpZipLib/wiki/Code-Reference" rel="nofollow">lib</a>. My code now is the following:</p>
  
  <pre><code>string dataSource = @"D:\\data\\2015-11-09-11-11-37-3286";
  FileStream fsOut = File.Create(dataSource);
  ZipOutputStream zipStream = new ZipOutputStream(fsOut);
  zipStream.SetLevel(3);
  int folderOffset = dataSource.Length + (dataSource.EndsWith("\\") ? 0 : 1);
  CompressFolder(dataSource, zipStream, folderOffset);        
  zipStream.IsStreamOwner = true; // Makes the Close also Close the underlying stream
  zipStream.Close();
  </code></pre>
  
  <p>CompressFolder method could be find <a href="https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples" rel="nofollow">here</a>. I am receiving the following message (the dir is an existing path):</p>
  
  <blockquote>
    <p>DirectoryNotFoundException: Could not find a part of the path "D:\data\2015-11-09-11-11-37-3286".
    System.IO.FileStream..ctor </p>
  </blockquote>
  
  <p>The problem is located in the second line of the suggested code <code>FileStream out = File.Create(dataSource);</code></p>