1. Because. NetProgramCodeThe IL code is compiled by the corresponding compiler, And the Il code is installed on the machine. netframwork, so as long as it is installed on the machine. netframwork can parse the pre-compiled il code. Because all. NET languages are based on IL, If you implement language upgrades and other problems, you only need to modify Il to change the corresponding language.
2. When loading a DLL or EXE file, the mian method entry contains the resources required for execution in the header (PE) of the DLL file or EXE file, it must support metadata during runtime. If a method in the class is called multiple times, the entire resource loading process is fully executed only during the first execution, and the method is stored in the memory. If this method is detected, call this method directly. Start from scratch.
Metadata is the basis for all operations: locate metadata --> main method entry ---> execute in jitcomplier (timely compiler) to locate methods (attributes, etc.) in metadata) il code --> allocate memory to the Il code ---> compile the Il code with the CPU command ---> Save it to the allocated memory ---> then jump to the memory to execute the method.
Iii. Introduction to namespaces.
System: contains some basic types required by the reference program:
System. coliection: The type under it is mainly used to manage sets. Such as stack, queue, and hash.
Syetm. Diagnostics: Class under it is used to help diagnose and debug referenced programs.
System. Enterpriseservices: The types under it are used to process management transactions, Team components, object pools, JIT activation (. net), security, and other advanced service programs that host code performance.
Sysetm. Globalization: its class is used to support multiple languages.
System. IO: Mainly used to operate Io streams, files, and directories. Including file movement, Directory creation, and so on.
Syetem. Management: Mainly used to manage Windows devices.
Sysetm. Net: Mainly used to handle network problems.
Sysetm. Reflection: reflection. Used to view the original data and the delayed binding type. You can use reflection to create a class library encapsulated as a DLL. To instantiate a class. You can also call methods and events of a class.
Sysetm. Resources: used to operate external resources.
Sysetm. Runtime. remoting: Specifies the access type from a remote machine.
System. rimtime. serialization: Used to serialize objects (classes, arrays, dataset, etc.) into binary files and XML files. Deserialization can implement the original type.
System. Security: used to protect data and resources, that is, encryption.
Syetm. Text: different encoding methods (acⅱ, Unicode)CompositionThis commonly used stringbuliding.
Syetm. Threading: A thread processing operation. It also runs several threads, exclusive locks between threads and processes, thread synchronization, thread Asynchronization, and other operations.
Syetme. xml: it is mainly used to process XML files, create and save XML files, add and delete nodes, and perform XML-related operations.