Namespaces are more like a compilation time construct, and then a run-time construct. Putting classes in a namespace primarily affects the class name only. The "full name" of any class is actually its namespace hierarchy (separated by dots . ), Followed by the actual class name. You do not load the namespace at run time, the whole concept does not exist.
When compiling a program, if you compile it into a library (DLL), you can add a link to this .dll, in which case all classes in this DLL will be โaccessibeโ in your program. As for whether they will be loaded, it is certainly possible to load them, but the probability of lazy initialization of unused classes will not have a significant impact on performance.
When you add a using statement to the top of a file for a namespace, it does not โloadโ that namespace. It will be used by the compiler to resolve all "unskilled" class names to "fully qualified" class names (at compile time). If you used only full class names, you wonโt need using (but it really clutters your code, so you should add them anyway).
Servy source share