As mentioned before, be sure to differentiate between namespaces and class libraries:
1) Namespace: Also called the assembly, you can see the "container" of the class, can contain more than one class
2) Class Library: Many kinds of classes together, it is equivalent to a lot of files to form a compressed package.
Create a new class library project that ends with a. dll, and VS automatically adds a Class1.cs file to the project, either writing code in such a file, or adding a new class. There is no limit to the number of classes that can be accommodated in a class library project, but only classes that declare public can be used by outsiders.
"Note" "namespace" is a logical concept, his physical vector is "assembly", which is embodied as "DLL" (or EXE) file, in VS, you can create a class library type of project to build the assembly.
An assembly can contain multiple namespaces, and a namespace can be distributed across multiple assemblies.
To create a new class library project, use the following method:
First step: Right-click "solution" to add a new item to the DLL end of the class library file.
Step Two:
The third step: when the Class Library project is built, it needs to be generated, otherwise it will not work.
Fourth Step:
Fifth step: In the main function, add a reference to the self-built class library.
02-25 How to use new class libraries