Frank, As several people pointed out, you can actually reference the EXE. But I wouldn't recommend it. Putting the global variables in a low-level .DLL is the optimal way to approach this problem. The cleanest way, however, would be to define an interface with properties referring to your 'global things' in the low-level dll and then implement the interface very high up, probably in the .exe itself. You will still need at least one global variable in the .dll - something which you could call GlobalContext, for example - representing an interface pointer to the global 'block'
Kamen Lilov http://www.delera.com -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Franklin Gray Sent: Thursday, September 08, 2005 7:10 PM To: [email protected] Subject: [ADVANCED-DOTNET] Circular Reference 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)? NOTE: DON'T WANT TO BE FLAMED FOR USING GLOBALS....THIS IS ONLY FOR THE RARE CASE THEY MAKE SESNE SUCH AS THE USER OBJECT. =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
