Kele,
As Klaus suggested NAMESPACES do not reference each other, hence there is no
chance of a circular dependencies!
..NET is able to handle correctly if you have two types (type as in classes,
structures, interfaces) that reference each other within the same assembly.
The problem comes in when you have two Assemblies reference each other,
which can lead to circular dependencies, as the first needs to be compiled
before the second, however the second needs to be compiled before the first.
If I have a need for two assemblies referencing each other, I normally
implement the Separated Interface.
http://www.martinfowler.com/eaaCatal...Interface.html
In the SubModule, define an Interface that the MainModule implements, that
the SubModule uses. Alternatively define the Interface in a third assembly.
The MainModule is then free to reference the SubModule, while the SubModule
is not explicitly dependent on the MainModule.
Hope this helps
Jay
"kele" <ke********@yahoo.com.au> wrote in message
news:45****************************@phx.gbl...
It would still not work, because you can not have
circular dependencies so if you add the reference to the
SubModule Namespace in the MainModule you can call
methods etc in the SubModule classes. But you can not
access the Variables class from the SubModule classes.
The only way I can think of getting around this is to
have the Variables Class in a module on its own (which
doesn't make as much sence).
I just wanted to know what Microsofts best practice is
for this type of design.