DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sun, 19 Aug 2007 08:32:22 -0700,    posted on: microsoft.public.dotnet.languages.vc        back       

Thread Index
  1    Cat
          2    David Wilkinson
          3    Cat


Multi-level namespace?   
In C#, this is legal
namespace MyNamespace.MyApp
{
}

But when I did that in VC++, it didn't compile.
I had to change it to
namespace MyNamespace
{
  namespace MyApp
  {
  }
}

If the level is more than two, it gets really nasty. Why can't I do it
the way I do in C#?
Date:Sun, 19 Aug 2007 08:32:22 -0700   Author:  

Re: Multi-level namespace?   
Cat wrote:

> In C#, this is legal
> namespace MyNamespace.MyApp
> {
> }
> 
> But when I did that in VC++, it didn't compile.
> I had to change it to
> namespace MyNamespace
> {
>   namespace MyApp
>   {
>   }
> }
> 
> If the level is more than two, it gets really nasty. Why can't I do it
> the way I do in C#?


Cat:

Wrong syntax.

namespace MyNamespace::MyApp
{
}

-- 
David Wilkinson
Visual C++ MVP
Date:Sun, 19 Aug 2007 12:05:33 -0400   Author:  

Re: Multi-level namespace?   
On Aug 20, 1:05 am, David Wilkinson  wrote:

> Cat wrote:
> > In C#, this is legal
> > namespace MyNamespace.MyApp
> > {
> > }
>
> > But when I did that in VC++, it didn't compile.
> > I had to change it to
> > namespace MyNamespace
> > {
> >   namespace MyApp
> >   {
> >   }
> > }
>
> > If the level is more than two, it gets really nasty. Why can't I do it
> > the way I do in C#?
>
> Cat:
>
> Wrong syntax.
>
> namespace MyNamespace::MyApp
> {
>
> }
>
> --
> David Wilkinson
> Visual C++ MVP


Thank you.
Date:Sun, 19 Aug 2007 20:38:33 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us