How it works...

In steps 1 to 10, we opened the solution from the previous recipe and added a .NET Core console application. In these steps, we gave it a proper name. In step 17, we added the code-level reference to the library. In step 18, we created the code inside the Main method. In the first line, we created an instance of the LoggerDemo class and stored it in a variable. In the next few lines, we executed the public methods of CallMethod1(), CallMethod2(), and CallMethod3().

Finally, in steps 19 and 20, we executed the code and tested it. In steps 21 and 22, we investigated the text file created from the library.

Get .NET Standard 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.