Skip to Content
.NET Standard 2.0 Cookbook
book

.NET Standard 2.0 Cookbook

by Fiqri Ismail
May 2018
Intermediate to advanced content levelIntermediate to advanced
394 pages
9h 51m
English
Packt Publishing
Content preview from .NET Standard 2.0 Cookbook

How it works...

In steps 1 to 5, we created a blank solution using Visual Studio 2017 and gave it a proper, meaningful name. In steps 7 to 10, we added a .NET Standard 2.0 class library to the project. We renamed the default Class1.cs generated by the template in step 12. In step 14, we added two namespaces to the code. The System.IO.Compression namespace contains all the necessary classes for compressing and decompressing. In step 15, we added a private variable that holds the path to compress. In this case, it is a folder.

Step 16 introduced the constructor with a source path parameter to zip. In step 17, we created a method that uses the ZipFile class and its method to compress a given source folder. And then, finally, we created a method ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 7 and .NET Core 2.0 High Performance

C# 7 and .NET Core 2.0 High Performance

Ovais Mehboob Ahmed Khan
.NET Core 2.0 By Example

.NET Core 2.0 By Example

Neha Shrivastava, Rishabh Verma

Publisher Resources

ISBN: 9781788834667Supplemental Content