1. What is a namespace? What is assembly?
Namespace: the compilation unit used to organize and reuse code. It effectively avoids the issue of class life conflicts caused by using two or more assemblies in the same program.
Assembly :~ Is an exe executable or DLL file. It contains the Common Intermediate Language of the program.
2. Assembly generation process?
3. What is the namespace declaration syntax?
Namespace SimpleNamespce
{
TypeDeclarations;
}
Note: 1. namespace is a keyword.
2. SimpleNamespce is the namespace name.
4. What are the namespaces and using commands?
1. Use the using command to avoid repeated write of fully qualified names.
2. The using command must be placed at the top of the source file before any type declaration.
3. They are applied to all namespaces in the current source file.
5. What is the comparison between the using command and the using command?
Do not use the using command:
Class WidgetsProgram
{
Static void main ()
{
MyCorp. SuperLib. SquareWidget sq = new MyCorp. SuperLib. SquareWidget ();
....
}
}
Use the using command:
Using MyCorp. SuperLib
Class WidgetsProgram
{
Static void main ()
{
SquareWidget sq = new SquareWidget ();
....
}
}
The author's wheat forever.