Class library assemblies group types together into easily deployable units (DLL files). Apart from when you learned about unit testing, you have only created console applications to contain your code. To make the code that you write reusable across multiple projects, you should put it in class library assemblies, just like Microsoft does.
Note
Good Practice
Put types that you might reuse in a .NET Standard class library to enable them to be reused in .NET Core, .NET Framework, and Xamarin projects.
Start Microsoft Visual Studio 2017. In Visual Studio, press Ctrl + Shift + N, or go to File
| New
| Project...
.
In the New
Project
dialog, in the Installed
list, expand Visual C#
, and select .NET Standard
. In the center list, select Class Library (.NET Standard)
, type Name
as PacktLibrary
, change Location
to C:\Code
, type Solution name
as Chapter05
, and then click on OK
, as shown in the following screenshot: