[Reading Notes] C # advanced programming (1). NET Architecture,
Written before: I have been in the active phase for two years, but I have not carefully thought about why I used it. I have also roughly scanned the book c # advanced programming before, this time I want to take the impulse in my mind to carefully read this book, consolidate the foundation, and learn new things.
I. NET Architecture
1.1 relationship between c # And. NET
C # is essentially a language, and. NET is a technical platform.
1.2 public language library
The core of. NET FrameWork is the runtime execution environment, that is, the Common Language Runtime Library (CLR ). In. NET, compilation is divided into two phases: (1) Compiling source code into Microsoft intermediate language (IL); (2) Compiling IL into platform-specific code by CLR
1.3 intermediate language
Main features of the intermediate language: significant differences between the object-oriented language and the interface used, value type and reference type, strong data type, exception handling, and attribute );
Object-oriented and Interface
Value Type and reference type: Value Type: a variable directly stores its data. The reference type only stores the address, and the corresponding data is in the address;
Strong data type: all variables are clearly classified into a special data type. General Data System (CTS ):
Garbage collection: the. NET platform has two technologies to release the memory dynamically requested by processes to the system. 1) the application code completes the work (dispose method) completely manually. 2) maintain the reference count for the object.
1.4 assembly
An assembly is a logical unit that contains compiled. NET Framework-oriented code. Two types: private assembly and shared assembly.
Private Assembly: it is usually attached to a software and can only be used for this software.
Shared Assembly: public libraries that can be used by other applications. There are two risks: Name Conflict and incompatibility between the Assembly and some client code. Name Conflict: use the private key encryption method to assign a strong name (strong name) to the shared assembly ). The issue of code incompatibility is solved by adding version information to the Assembly List.
1.5. NET Framework class
1.6 namespace