[Solved] how combine two project in c# (from 1ts project open 2nd project and from 2nd project open 1st project) [closed]


It’s called Circular Dependency. If you google it, you’ll find many articles and resources about it, one of them.

To sum up what they are offering, one thing you can do is to use Interfaces, and program against interface, but not concrete class.

Another option is to have third project with core functionality, and just make other two projects reference not each other, but the core project.

One more thing to consider, is do you really need two project, if one should reference another. You talk about forms, so I assume that these projects are related to user interface. In general, there is no need to have two layers for user interface code (of course there are exceptions) if you are going for layered architecture. So if these projects depends on each other a lot, I would keep them in one project.

1

solved how combine two project in c# (from 1ts project open 2nd project and from 2nd project open 1st project) [closed]