Before namespaces were introduced in C ++, all C types were in the global namespace. Namespaces were created to separate types into logical containers, so it was clear which type they belonged to. This also applies to C #.
Assemblies are a deployment solution. If you look at the .Net structure, this assembly will contain several different namespaces.
The folder is intended for organizing files on the disk.
These three have nothing to do with each other, but it is often convenient that the assembly name, namespace, and folder names are the same. Note that Java collapses folders and namespaces into the same thing (limiting the freedom of developers to organize files and namespaces).
Often we choose to organize files in a project into several folders, because it is easier for me or my team to move around the files. Usually this file organization has nothing to do with the namespace design that we use. I'm sorry that the VS command will not use the namespace by default as the folder name, or at least give the option so that it is not the default.
Do not suffer, either change the template for new classes, or correct the namespace after creating a new file.
Franklin Wise Apr 13 '13 at 17:56
source share