Namespaces in VB.NET

2 views
Skip to first unread message

Colmeister

unread,
Jul 23, 2008, 4:42:21 AM7/23/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi,

When writing an application in C#, if I create a new folder in
Solution Explorer any classes I create in that folder contain the
folder name as part of the namespace.

For example if the namespace of my project is MyProject and I create a
folder called Data, any classes I create in this folder are in the
namespace MyProject.Data.

Does anyone know if I can force VB.NET to behave like this as well. I
know it's possible to use the Namespace keyword in VB.NET source files
but it's a real pain to do this manually for every new class. I can't
find an option in the IDE to do this automatically.

Thanks in advance,

Colin

Cerebrus

unread,
Jul 23, 2008, 1:06:21 PM7/23/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
AFAIK, this is a C# only feature, though I would love to discover that
it is otherwise !

Glenn

unread,
Jul 23, 2008, 6:19:06 PM7/23/08
to DotNetDe...@googlegroups.com
It's a wonderful feature.  Another reason to dump VB and go to C#.  :)

...Glenn

Cerebrus

unread,
Jul 24, 2008, 12:15:58 PM7/24/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I'd love to disagree with that ! :P
> > > Colin- Hide quoted text -
>
> - Show quoted text -

Glenn

unread,
Jul 24, 2008, 4:53:32 PM7/24/08
to DotNetDe...@googlegroups.com
I know you would!!
Reply all
Reply to author
Forward
0 new messages