I. C # overview,
1. Managed execution environment 2. Assembly 3. Keywords: C # reserved words 4. developers can provide their own names in addition to the keywords defined in C, the programming language calls these names identifier 5. If a keyword contains a "@" prefix, it can also be used as an identifier. For example, you can name a local variable as @ return6 and a variable: A variable is the symbol name of the storage location in the memory. In the future, the program can assign values and modify the storage location. To declare a variable, You need: 1. Type of the data to be referenced by the variable 2. assign a variable of the identifier (variable name) operation value type, which is equivalent to direct addressing of the memory, A variable is applied for a piece of memory and an alias for it. 7. Data type, or abbreviation, is a classification of individuals with similar characteristics and behaviors. In programming languages, a type is a definition given to some individuals with similar features. 8. After declaring a local variable, you must assign a value to it before referencing it, the value assignment can be used to reference the value stored in the memory with a variable identifier. 9. A string is an unchangeable data of all string types. Whether it is a string literal or not (a direct amount), it is immutable (or unchangeable ). That is to say, you can assign the memory first address storing this string value to a string type variable, but you cannot change the memory storage value. This value is fixed, if you want to change the value of this string type variable, you can only apply for a new memory segment, store a new string, and assign the new reference (memory first address) to this string type variable. That is to say, you cannot modify the data that the variable originally references. You can only assign a value to the variable again to point it to a new location in the memory. 10. Format String 11, Managed execution, and common language infrastructure processors cannot directly interpret an assembly. The Assembly uses another Language (non-C #), that is, the Common Intermediate Language (CEL), or the Intermediate Language (IL) MSIL (Microsoft IL) the C # compiler only converts the C # source code file to this intermediate language. An additional step (usually completed at execution) is required to convert the server code into a machine code that can be understood by the processor ). This step involves an important element in C # program Execution: VES (Virtual Execution System ). VES is occasionally called runtime. It compiles the pencil code as needed. This process is instant compilation or JIT compilation (just-in-time compilation ). If the code is executed in the context of a "proxy" such as "RunTime", the code is called managed code ), the execution process under the runtime control is called managed execution ). It is called hosting code because "RunTime" manages aspects such as memory allocation, security, and JIT compilation, thus controlling the main program behavior. The code that does not require "RunTime" during execution is called the unmanaged code ). During running, this term may refer to "when a program is executed" or "virtual execution system ". Generally, execution indicates program execution, and runtime indicates the agent responsible for managing C # program execution. The VES specification is included in a more inclusive specification, that is, the CLI (Common Language Infrastructure, Common Language Infrastructure) specification, as an international standard, CLI includes the following specifications. 1. VES or runtime 2. CIL3. A Type System that supports language interoperability is called CTS (Common Type System ). 4. How to compile the guiding rules for libraries that can be accessed using various CLI compatible languages. This part is detailed in Common Language Specification (CLS) 5. enable various services to be identified by CLI (including Assembly layout or file format specifications) without data. 6. A public programming framework called the Base Class Library (BCL), which can be used by developers in all languages. If you act in the context of a CLI implementation, the programmer can use a large number of services and features without writing code directly, including the following: 1. language interoperability 2. type security 3. code access security 4. Garbage collection 5. Platform portability 6. BCL provides a large code library that developers can rely on. 1.8. Use ILDASM to decompile an assembly (. dll. exe) to generate the corresponding template.