On 08/09/2005 17:10, Franklin Gray wrote:
This is a bad thing in the COM world but wondering if it's still bad in
the DotNet world (I used to know but forgot).  I would like to use a Class
called Globals and put all global variables in there as shared so it will
be very very very clear as to them being global and can use intellsense
(no need to go lookup the variables when writting code).  The question
becomes, should I put this class in a dll and have all project reference
it making it the lowest level dll, or should I keep it in the main (exe)
project and have the dll's reference the exe if needed (causing the
circulare reference)?

Circular assembly (dll) references are not allowed.
Circular class references are perfectly fine.

So if your Globals class references types in other assemblies that
themselves reference it, you'll be creating a circular assembly reference.

If it just sticks to simple CLR types, you won't.

Using interfaces is one possible solution to break circular dependencies.

Barnaby

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to