1. Assemly       A managed module is a standard 32-bit Microsoft Windoes portable executable (PE32) file or a standard 64-bit Windows portable executable (PE32+) file that requires the CLR to execute.        Managed Module = IL + metadata.        Ass…
The CLR’s Execution Model The core features of the CLR memory management. assembly loading. security. exception handling. thread synchronization. Managed Module Parts of a Managed Module: PE32 or PE32+ header:The standard Windows PE file header, whic…
大家都知道,在调试托管代码时,一定会加载到sos/clr/mscorwks/mscordacwks这些动态库,才能够很好的完成我们的调试工作,那么他们的版本对应关系是怎样的呢,特别是clr.dll/mscorwks.dll有什么关系呢? clr是通用语言运行时库,对应的就是clr.dll/mscorwks.dll,在clr发展过程中,文件名发生了变化,他们的版本对应关系如下: .NET framework 版本 CLR 版本 CLR 文件名 1.1 1.1 mscorwks.dll 2.0 2.…
前言 在上一篇文章CLR类型系统概述里提到,当运行时挂起时, 垃圾回收会执行堆栈遍历器(stack walker)去拿到堆栈上值类型的大小和堆栈根.这里我们来翻译BotR里一篇专门介绍Stackwalking的文章,希望能加深理解. 顺便说一句,StackWalker在中文里似乎还没有统一的翻译,Java里有把它翻译成堆栈步行器,微软有的(机翻)文档把它翻译为堆栈查看器,我这里暂且将它翻译为堆栈遍历器,如有更合适的翻译,欢迎评论区指出. .NET运行时之书(Book of the Runtime…
   Kinds of methods        Constructors      Type constructors      Overload operators      Type conversions (for implicit and explicit casting)      Extension methods      Partial methods.              1. Instance Constructors and Classes (Reference…
1. Constants        A constant is a symbol that has a never-changing value. When defining a constant symbol, its value must be determinable at compile time. The compiler then saves the constant’s value in the assembly’s metadata. This means that you…
1. Primitive Types        Any data types the compiler directly supports are called primitive types.        Primitive types map directly to types existing in the Framework Class Library (FCL).        For the types that are compliant with the Common La…
1. System.Object        The runtime requires every type to ultimately be derived from the System.Object type.        Because all types are ultimately derived from System.Object, you are guaranteed that every object of every type has a minimum set of…
1. Weakly Named Assembly vs Strong Named Assembly        Weakly named assemblies and strongly named assemblies are structurally identical—that is, they use the same portable executable (PE) file format, PE32(+) header, CLR header, metadata, manifest…
1. C# Compiler - CSC.exe            csc.exe /out:Program.exe /t:exe /r:MSCorLib.dll Program.cs      This command line tells the C# compiler to emit an executable file called Program.exe (/out:Program.exe). The type of file produced is a Win32 console…