Bryan,
Thanks for the response, but I know I'm missing something because I
don't understand how this will work.
I have a winforms project and I declare a class in the project like
this:
Namespace nsGlobal
Public Class clsGlobal
Public Shared PubSharedString As String = "PubSharedString"
End Class
End Namespace
In the winforms project I have a reference to a separate DLL project.
Obviously the winforms app can instantiate a class from DLL to get a
reference to the class in the DLL, but I don't see how a class
*within* the DLL has any kind of a reference to the class from the
winforms app that instantiated the DLL.
Referencing "nsGlobal" from the DLL project tells me that "nsGlobal is
not declared".
I also tried putting the "nsGlobal" namespace in
"Application.vb" (along with the "My" namespace) and that fared no
better.
What fundamental understanding am I missing here?
Thanks.
On Jun 5, 6:49 pm, "Bryan Phillips"
<bphill...@nospam.spamcop.net.spammenot> wrote:
> Declare the global variables as public and shared:
>
[quoted text clipped - 33 lines]
>
> - Show quoted text -
Bryan Phillips - 16 Jun 2007 23:50 GMT
Shared/static constructors and fields/variables are executed or assigned
when the assembly is first loaded into memory.
If you are not able to see nsGlobal in Intellisense, there may be a root
namespace for the DLL that you are omitting. Usually, the root
namespace matches the name of the project unless you renamed the project
after creating it.
--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net
> Bryan,
>
[quoted text clipped - 66 lines]
> >
> > - Show quoted text -