[Reading notes] C# study notes one: .Net Framwork


[Reading notes] C# study notes one: .Net Framwork

Foreword: 
I saw a book published by @Learning hard in the garden by chance: <<C# Study Notes>>, and then I bought it and read it now, I feel very good, suitable for getting started, the content of the book is from C #1.0 to 5.0. Very comprehensive and detailed.

Let's share some things that I feel I need to record in this book. 

First paste @Learning hard's homepage in the blog garden: http://www.cnblogs.com/zhili/    
and some knowledge points in this book: http://www.cnblogs.com/zhili/category/421637 .html  

 

一: .Net Framework

1.1.Net Framework is the execution environment of the application runtime, which provides the following services for the execution of the application:

  >Comprehensive class library
  >Memory management
  >General type system
  >Development structure and technology
  >Language interoperability  

1.2 Composition of .Net Framwork

  1. Common language runtime

    The common language runtime is the core foundation of .Net Framwork. We can think of CLR as an agent that manages code during execution. It provides services for memory management, thread management and exception handling, and is also responsible for implementing strict types of code security checks to ensure the correctness of the code. we will be subject CLR managed code is called managed code (managed code), CLR managed code will not be called unmanaged code (unmanaged code).

    CLR consists of two components: Common Type System (CTS) and Common Language Specification (CLS).

 

1.3 .Net Framwork class library is a collection of DLL assemblies.

 

1.4 C# code execution process

  >C# code is compiled into intermediate language code stage

    When compiling C# code, the C# compiler (the C# compiler integrated in VS) translates the code into Common Intermediate Language (CIL) code

  >The intermediate language code is compiled into the phase of this season's code

    To make the C# code run, it is necessary to further convert the CIL code into the machine code of a specific CPU. This process is completed by the Just-In-Time (JIT).

  ●It is not only C# code that can be compiled into intermediate language code, other .Net-oriented languages ​​also need to be compiled into intermediate language code before execution. This process is completed by the compiler.

  ●After JIT compilation generates native code, the compiled code will be placed in a buffer cache. Next time you call the same code, you can directly run the existing native code in the cache to avoid re-verification of IL code And the process of compiling it into native code. Using this method, the system will only cause some performance loss when it is called for the first time (that is, the JIT process occurs).

 

C# code is compiled into intermediate language code stage: 

Intermediate language code is compiled into native code stage

PS: I  wanted to write more content today, but the time is late. There are still a few pictures missing here. I will fill it up tomorrow. If I have time, I will share what I learned at work: such as remote debugging, sql profiler, etc .

Category:  reading notes

Good article should  pay attention to my  favorite article  

Is a flower considered romantic


Guess you like

Origin blog.51cto.com/7592962/2543853