Including namespaces in new VB.NET classes
April 20, 2007
(UPDATED 2007-04-26 after reading this see https://www.marcusoft.net/2007/04/chose-your-battles.html)
When converting myself from C# to VB.NET I found one thing that annoyed me very much; when you create a new class in VB.NET the namespace is not included in the file.
After a long and hard search I found out that there is a bit of a cultural difference here that comes into play. On the project-file for VB.NET project you’ll find a setting called Root Namespace. The text you write here gets pre-pended to all classes a compile-time. So if you project has a namespace called Marcusoft.Business and you create a class called Product, the complete namespace for the class is Marcusoft.Business.Product.
Note that the Root Namespace gets pre-pended even if you state a namespace in the class. With Root Namespace to Marcusoft.Business and Namespace Entities above the class declaration the complete namespace for the class would be Marcusoft.Business.Entities.Product.
Apparently...