It doesn't really relate to the namespaces, per se, unless you are using
reflection to create the objects by name...
If you are strongly-naming your assemblies (that is, you are signing them
with an SNK or PFX), then when you reference that assembly the reference
includes not only the assembly name (MyLibrary), but also the exact version
number and a hash-value of the SNK. In your source-code, it might say
"MyObject.Stati cMethod()", but at runtime this is (essentially) "{MyObject
version 1.0.123.12315 signed by <hash>}.StaticM ethod()".
If you re-build your library (either as a different version or with a
different SNK) and get another assembly in the AppDomain to reference the
new version, it could ask for "{MyObject version 1.0.324.23421 signed by
<hash>}.StaticM ethod()}"; although they look similar, they are completely
different objects, and will not play well together; you would not, for
instance, be able to cast between them... Version policies in the GAC (if
you use GAC - personally I don't like to) can be used to say "if somebody
asks for 1.0.123.12315, then give them 1.0.324.23421 instead", but otherwise
you could get both in parallel... I think... maybe
Not sure if this *is* your issue, or even how much of this will happen in
reality... but the short of it is:
Objects are scoped by their assembly; strongly-named assemblies are
determined by their name, their full version, and their hash... If *any* of
these are different, you actually have 2 different objects.
Marc
<6t**@qlink.que ensu.ca> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Can you elaborate on what you mean Marc? I think the problem may
actually does relate to the naming, specifically the namespace. I
tried using the same pattern in a very small program and the problem
didn't occur. I thought the problem might because I a bunch of
"using" statements and somehow the same class in one namespace is
actually getting compiled into two separate classes in compiled code -
therefore, perhaps the problem wouldn't have occured if I have fully
qualified the singleton class's name.
Thoughts?
Novice