richie1950
asked on
Deeply nest{ed, ing} namespaces
Under java/C#/... it is easy to put classes/code/... deeply down in a namespace/package. For instance, if I have a class Foo and want it to be in the Bar.Foos.Impl package (so it is then Bar.Foos.Impl.Foo), in C# I can do
namespace Bar.Foos.Impl
{
class Foo { }
}
Is there a simple way to do this in Managed C++?
I know I can do:
namespace Bar { namespace Foos { namespace Impl
{
class Foo;
}}}
but it would seem that there would be an easier way to do this since .Net tends to encourage it.
I've of course tried some other possibilities:
namespace Bar::Foos::Impl (which I thought would work)
{
class Foo;
}
and (which I thought wouldn't)
namespace Bar.Foos.Impl { class Foo; }}
namespace Bar.Foos.Impl
{
class Foo { }
}
Is there a simple way to do this in Managed C++?
I know I can do:
namespace Bar { namespace Foos { namespace Impl
{
class Foo;
}}}
but it would seem that there would be an easier way to do this since .Net tends to encourage it.
I've of course tried some other possibilities:
namespace Bar::Foos::Impl (which I thought would work)
{
class Foo;
}
and (which I thought wouldn't)
namespace Bar.Foos.Impl { class Foo; }}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.