C# - Simple Class Library and how to use it in another project
C# - Simple Class Library and how to use it Create a Class Library Project Create a new project - Console Application Right click on the newly created project and Set it as a StartUp Project Reason: You cannot run a Class Library on it’s own, it needs to be called from another project. Add a reference to your Class Library project In the SimpleClassLibrary Project - rename the Class to PrintOK and add a public method WriteOK() using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace SimpleClassLibrary { public class PrintOK { public void WriteOK(){ Console .WriteLine( "OK" ); Console .ReadLine(); } } } Add preprocessor directive In the UsingClassLibrary project, add the following code: using System; using...