user2968369
user2968369

Reputation: 275

Cyclic dependency issue in c# while trying to add references

I have two Class Libraries (Lets say LibA and LibB). LibA is using some fnctions of LibB so I add reference of LibB in LibA.

Now LibB also needs to use some code of LibA. I cant add reference of LibA to LibB now because of cylic dependency thing. What can i do now that my LibB can access code of LibA?

Upvotes: 0

Views: 91

Answers (1)

Ric
Ric

Reputation: 13248

The code should be placed into a new library so that both projects can reuse the code. Further to this, if a new project is added to the solution it also can make use of the shared code. It's not inefficient or redundant in anyway and is indicative of good design and usability.

Upvotes: 5

Related Questions