Re: How To Use Nested Namespace [Help]

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Scott M. (s-mar_at_BADSPAMsnet.net)
Date: 04/06/04


Date: Tue, 6 Apr 2004 15:57:32 -0400

By default, your project name becomes the "root namespace" of your assembly.
If you are using VS.NET, just right click on the project in the Solution
Explorer and you'll see an option to change the name of the Root Namespace
there.

To create sub-namespaces, do exactly what you wrote down below (remembering
to end each namespace):

Namespace A
    Namespace B
        Namespace C

            Public Class Foo

            End Class

        End Namespace
    End Namespace
End Namespace

All 3 namespaces are part of the root namespace (project name by default or
you change in project properties) and Foo is in the namespace:

RootNamespace.A.B.C.Foo

"Tiraman" <tiraman@netvision.net.il> wrote in message
news:eUn0fABHEHA.3528@TK2MSFTNGP09.phx.gbl...
> Hi ,
>
> I would like to use nested namespace .
>
> I have 3 namespace as dll's :
> Namespace A
> Namespace B
> Namespace C
>
> And i want to have some namespace that contain them all , some thing like
>
> Namespace MyComp.A.B.C
> Or
> Namespace MyComp.A.B or Namespace B.C And so on ...
>
> (e.g ---> System.Data)
>
> please help
>
>



Relevant Pages

  • Re: [Assembly].GetExecutingAssembly().GetName().Name Missing Under
    ... >the name of my resource file, just the actual project and executable itself. ... Right, it's the default namespace that matters, not the assembly name. ... Change the root namespace to contain periods instead of underscores ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Project level "Type not defined" error messsage.
    ... namespace for ASP.NET apps, anyway. ... "Greg Burns" wrote: ... > ProjectName as your root namespace your effective namespace will look like: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Cannot "imports" a newspace, Why?
    ... you should change your imports to ... my suggestion is you delete the root namespace from the ... I will see this error message: ...
    (microsoft.public.pocketpc.developer)
  • Re: Default namespace
    ... requiring *any* namespace designations at all is a new one on me. ... just as if that was the Root Namespace. ... > In VB, if you specify a root namespace for the project, it is the root ... The .NET Framework specifies that assemblies have a "Root ...
    (microsoft.public.dotnet.framework)
  • Re: Using a Reference in a Service
    ... suggested and set up a root namespace and drilled down from there in the ... I normally set the root namespace for the Project (as ... > Note I modified one of my projects so the Windows Service root namespace ... >> uses the namespace clue, my web app uses the namespace clue, my dll ...
    (microsoft.public.dotnet.languages.vb)