I've hosted the source code on GitHub demonstrating using .NET to compress a folder and its contents into a single .zip archive. It also demonstrates decompressing such an archive into its component directory, subdirectories, and files.
To compile, you'll need response file resp.rsp in the same directory as simpleCompExt.cs. The contents of that response file should be:
/r:System.IO.Compression.dll
/r:System.IO.Compression.FileSystem.dll
/out:simple.exe
simpleCompExt.cs
To compile from the command line, execute the following from the source code directory:
csc @resp.rsp
If you want to experiment with this, be sure to add a few small files to the /start subdirectory (so that there's something to compress and extract).