NibblyPig
NibblyPig

Reputation: 52952

Is it possible to remove the default namespacing that VB.NET creates?

Converting a C# project to VB.NET, C# projects start off with namespace Foo { in each class. Is it possible to have the same behaviour in VB.NET?

The problem is VB.NET already creates a namespace with the project name that is hidden, so if you do Namespace Foo in VB.NET you end up with all your stuff in the namespace Foo.Foo

Upvotes: 2

Views: 733

Answers (1)

Mehrdad Afshari
Mehrdad Afshari

Reputation: 422270

Yep. Just clear out the "Root Namespace" textbox in the project settings.

If you are compiling from the command line, don't pass a /rootnamespace: switch to the compiler.

Upvotes: 5

Related Questions