namespace project root namespace confusion

N

nick

I know this is a basic question and I realize fully exposing the beginners
nature of my DotNet experience.

Anyway, what dictates what will be contained in a DLL? When creating a
project, it will be compiled into a dll. A namespace can space over several
projects. Where does the "root namespace" fit into the picture? Can several
projects be compiled into 1 dll from the IDE?

I have started working on a project and need to get all this terminology
straight. I will be creating a usercontrol that currently sits in its own
projects. However, it consumes classes that currently sits in two other
projects and currently 3 dlls are produced. I would like to assemble into 1
dll. How should I go about doing this? Use the Assembly Linker (AL.EXE) or
should I put all source code in the same project?

What is best practice?
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Nick,

Namespaces are imaginary. They are only a way of conveniently grouping
classes and nothing more than that. Classes from the same namespaces can be
contained in a number of assemblies, as well as a single assembly can
contain classes from various namespaces.

Several projects, however, cannot be compiled into a single DLL (well, at
least the short answer is "No"). But don't worry about the number of DLLs
produced - a modular application structure usually pays off, so it is
actually a good idea to put business logic into one DLL, and UI components
to another, and reference them from the main program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top