TWO MAIN COMPONENT : COMMON LANGUAGE RUNTIME & THE .NET FRAMEWORK.
COMMON LANGUAGE RUNTIME IS THE FOUNDATION OF THE .NET FRAMEWORK.IT IS A AGENT TO MANAGE CODE AT RUNTIME.IT PROVIDE CORE SERVICES SUCH AS MEMORY MANAGEMENT,THREAD MANAGEMENT AND REMOTING.
THE .NET FRAMWORKD LIBRARY IS A COMPREHENSIVE,OBJECT-ORIENTDE COLLECTION OF REUSABLE TYPES THAT YOU CAN USE TO DEVPLOP APPLICATIONS.
COMMON LANGUAGE RUNTIME
1.管理执行过程
编译器(COMPLIER)把源代码转换成MSIL(microsofe intermediate language).然后通过(just-in-time JIT compiler)把MSIL转换成cpu-specific code.
编译器把msil转换成msil的同时,也会产生metadata,metadata描述了代码的类型定义(definition of each type),type 成员的签名,code 的reference,代码执行时期的其它数据。
metadata数据和msil使得你的代码能够实现自描述。
只有在执行时才会把msil语言转换成native code ,在转换的过程中,code 必须通过一个验证的过程。除非管理员建立了安全机制允许这些code不通过验证执行。
验证的过程是判断code是否是TYPE SAFE 的过程。
1。TYPE 的REFERENCE和type 兼容
2.project中只有恰当的操作被调用
3.声明和定义一致
执行code.
2.Automatic Memory Management
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconeventsinwebformscontrols.asp