1
Answer

C# Circular Dependancy

L M

L M

14y
3k
1
Hi all,

Design question, I have three library projects, A, B and C.

Project A - error logging class
Project B - properties class with static methods
Project C - eventing class with static methods

Unfortunately, I want project A to use the properties class B, B to use the eventing class C, and C to contain an error logger object, resulting in a circular dependancy:

A <<uses>> B <<uses>> C <<contains>> A

How can I get around / redesign this? I'm a bit of a novice and might be missing the obvious but I don't see how I can use an interface, as C contains an error logging object, it is not passed an error logger as a method parameter.

Thanks in advance, am so confused!

Answers (1)