1. What is. NET Framework?
. NET Framework is an application developed by Microsoft.ProgramA revolutionary new platform was created.
. NET framework can be used to create Windows applications, web applications, web services, and other types of applications.
. NET Framework supports not only C # languages, but also some old languages such as C ++, JScript, and Visual Basic.
. NET Framework mainly contains a very largeCodeLibrary, which can be used in customer languages (such as C #) through Object-Oriented Programming Technology (OOP.
The. NET Framework also contains the Common Language Runtime (CLR), which manages the execution of all applications developed using the. NET library.
2. How to Use. NET Framework to write applications?
To execute C # code, you must convert it into a language that the target operating system can understand, that is, the local code. This conversion is called the compiled code, which is executed by the compiler.
3. msil and JIT
Used in compilation. net Framework library code, instead of creating the operating system-specific local code immediately, the code is thought of as Microsoft's intermediate language (Microsoft intermediate language, msil) code, these codes are not designed for any operating system or for C #. When vs is used to develop a C # application, the compiling process is completed by.
Obviously, to execute an application, more work must be done, which is a task of the just-in-time (JIT) compiler, it compiles msil into local code dedicated to the OS and target machine structures. In this way, the OS can execute the application. The JIT compiler uses msil code, which is independent of machines, operating systems, and CPUs. We can always find a suitable native code created by the compiler.
4. What is an assembly?
Libraries used by other applications (whose extension is. dll ).
In addition to msil, an assembly also contains metadata (metadata) and optional resources (other data used by msil, such as audio files and images ).
When deploying an application, you only need to copy the file to the directory on the remote computer. Of course, you do not have to install all the information required to run the application in one place. Some reusable code is usually put in a place that can be accessed by all applications. In. NET Framework, This is the Global Assembly Cache (GAC ).
5. managed code
After the code is compiled into msil and compiled into local code using the JIT compiler, CLR manages applications by managing memory, processing security, and enabling cross-language debugging. Instead, applications running outside of the control of CLR are not hosted.
6. Garbage Collection
Garbage collection is one of the most important functions of managed code ). This. Net method ensures that the memory will be completely released when the application no longer uses some memory .. . Net garbage collection frequently checks the computer memory and deletes unwanted content from it.
7. namespace
Namespace is the method that provides application code containers in. net, so that the Code and its content can be uniquely identified. Namespace also acts on a way to classify items in. NET Framework.
8. "<" and ">"
If you move one digit to the left, 2 is left, And if you move one digit to the right, 2 is left. (Four digits are left when two digits are left)