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 11, we created a blank solution and added a .NET Standard 2.0 library to the solution. In these steps, we assigned proper names to the solution and to the library. In steps 12 and 13, we renamed the existing Class1.cs created by Visual Studio. In step 15, we created a using directive to access the file operations.

In step 16, we created two private variables to hold the filename and the StreamWriter class. In step 17, we created the default constructor and we are calling the WriteLog() method we created in step 18. In step 19, we created three test methods to demonstrate logging. Finally, in step 20, we performed a quick build to check for syntax. 

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