How to use a class from one C# project with another C# project
Simply add reference to P1 from P2
How to use a C# class in many projects inside the same solution
Create a Class Library project within your solution and put your shared classes in there (right click on your solution in the Solution Explorer, Add, New Project). Then for each of the projects that you want to access the classes from, right click on Dependencies, Add Project Reference and tick the Class Library project you created.
How to import a class from another project in Visual Studio 2013 Ultimate
in solution explorer, right click on your project and go to add ==> existing item, then browse to the path of your existing class.
Share common c# class between 2 projects but allow a project to make changes to it
Don't write a class. Write an interface. Then, by design, a class that depends on the interface can use any implementation of the interface.
Using an object from another project in Visual Studio
Your program class should normally be part of your GUI project (which also has the window class). Then in your GUI project you only have to reference the db (context) and not vice versa which removes the circular dependency.
Also, you call a constructor of MainWindow with a parameter db (instance of ProgramControl; entityContext) which is not in your code?!
how to use class of other project in a solution (internal)?
In visual studio you should have a "References" area in the Solution Explorer. Right click that and click "Add Reference..."
From here, it's just a matter of locating where you other code is on your machine.
Edit: Here is some additional information on DLLs, in case it helps you.
Related Topics
Removing Elements from Json Based on a Condition in C#
How to Count Rows Within Entityframework Without Loading Contents
How to Encrypt a Password Within Appsettings.Json for ASP.NET Core 2
Check If Combobox Value Is Empty
How to Get the Am/Pm Value from a Datetime
File and Line Numbers for Errors Are Not Displaying in the Error List Unless the File Is Open
How to Convert HTML to Pdf Using Itextsharp
How to Cast Object to List<Object> and Turn It into an Array
Compare Two Objects' Properties to Find Differences
How to Determine Browser Window Size on Server Side C#
Calling a Function from Another Class in C#/.Net MVC App
How to Store List of Data from Database to Arraylist or List in C#
Error Reading Jobject from Jsonreader. Current Jsonreader Item Is Not an Object: Startarray. Path
Reference External Dll in .Net Core Project
How to Open the Default Chrome Profile Through Selenium, Chromedriver and Googlechrome
Console.Writeline Does Not Show Up in Output Window
Using Newtonsoft to Deserialize a Date Stamp That Might Consist Only of a Year