2, in essence, is the mother tongue of the .NET platform CIL, when we choose a hosted programming languages (C #, VB, COBOL.NET etc.) to build .NET assemblies when associated with the language ludo compiler source code translated into CIL. We can use the .NET Framework SDK provides CIL and CIL compiler (ilasm.exe) to develop and build .NET assemblies, although usually we rarely do. So the CIL correspond .NET developers like assembly language for a C ++ programmers.
3, CIL defines a common set of keywords that can be divided into three categories: CIL instructions, CIL characteristics and CIL opcode. CIL instruction is used to describe ludo the overall structure of .NET assemblies, it is used to inform the CIL compiler used in the assembly of how to define namespaces, types and members. CIL instruction uses a prefix to indicate, as the syntax (.): .namespace, .class, .publickeytoken, .method, .assembly Like. CIL feature can define how to handle a CIL instructions. For example: a .class instruction (clear visibility of the class), extends feature with public properties (clear base class) and implements characteristic (definite class supports the interface) combined. CIL opcodes provide implementation logic class. Such as: ldstr (reprint string), box, unbox, throw, sizeof like.
6, dynamic assembly created at runtime by using System.Reflection.Emit named type space provided in memory, System.Reflection.Emit namespace so that the assembly is created and its modules at run-time type definitions and implementation logic become CIL possible. Once you have completed these, ludo you can save memory on disk binaries to generate a new static assemblies. Although ludo creating a dynamic assembly is not very common, ludo but in some cases this technology is still as useful: first, the need to build the assembly file generated .NET development tools based on user input; a second building at run time by yuan the type of data to generate a remote agent program; third, still want to load the assembly and the ability to dynamically insert a new type to the binary image.
No comments:
Post a Comment