Root namespace in vb.net

  • Thread starter Thread starter Viet
  • Start date Start date
V

Viet

Is it possible to instantiate an object from the Root namespace? I have a MS
Visual Studio 2002 vb.net project consisting of a dozen individual project
files and I would like to know how to transfer messages from project to
another within the Solution Explorer.
 
Viet said:
Is it possible to instantiate an object from the Root namespace? I have a
MS
Visual Studio 2002 vb.net project consisting of a dozen individual project
files and I would like to know how to transfer messages from project to
another within the Solution Explorer.

You can reference other DLL projects from within DLL/EXE projects. It's not
supported to reference an EXE project from another project. To add a
reference, right-click the project in the solution explorer, choose "Add
reference...", and select the project in the projects tab.
 
Thanks for your reply.

All my project files are exe format. For me to add a reference to the
project, I have save them as a dll which won't do (because of the code).
Is there another way?
Thanks,
Viet
 
Viet Pho said:
All my project files are exe format. For me to add a reference to the
project, I have save them as a dll which won't do (because of the code).
Is there another way?

No.
 
You can actually just change the file extension from .exe to .dll and you'll
be able to make the references and use the objects. You will NOT be able to
run those projects directly anymore, however.
 
Since the root namespace is essentially another namespace, can't I just
declare a namespace class and have it reference the root namespace?
 
What do you mean by the root namespace being "another" namespace?

Namespaces are just labels that designate how to organize and group classes
and interfaces. How and why you make references is not affected by
namespaces.

Namespaces are used to refer to a class. Imports statements are used so
that you don't have to refer to the namespace that a class is in.
Namespaces and references are two distinct and different things.
 
Back
Top