[英].NET Execution Engine and BCL (Base Class Library) cooperation
Currently I'm reading a book named C# Pro 7 with .NET and .NET Core written by Andrew Troelsen and Philip Japikse as extra addition to my programming theory. 目前,我正在读一本由Andrew Troelsen和Philip Japikse撰写的名为.NET和.NET Core的C#Pro 7,作为我编程理论的补充。 Topic which on this moment is courious for me is collaboration .NET execution engine (mscoree.dll) with .NET base class libraries like for example mscorlib.dll.
目前让我感到好奇的主题是带有.NET基类库(例如mscorlib.dll)的协作.NET执行引擎(mscoree.dll)。
Can somebody tell me what is the reason why our solution code is interacting with BCL during the compilation to instruction-set platform? 有人可以告诉我,在编译成指令集平台期间,我们的解决方案代码与BCL交互的原因是什么?
"The CLR will also interact with the types contained within the .NET base class libraries when required" what does 'required' part of this sentece exactly mean? “在需要时,CLR还将与.NET基类库中包含的类型进行交互。”此语句的“必需”部分究竟是什么意思? Because once again it's moreover the thing what I would like to understand in correct manner :)
因为这又是我想以正确的方式理解的事情:)
I've just started working through this book. 我刚开始读这本书。 Probably you've already found an answer but for curious others I'll put my two cents.
可能您已经找到了答案,但是对于好奇的人,我将投入两分钱。
In order for the compiled code to be run on a platform it should be compiled to platform-specific instructions. 为了使编译后的代码在平台上运行,应将其编译为特定于平台的指令。 But before that the code should be compiled to MSIL file.
但是在此之前,应将代码编译为MSIL文件。 For the app code this MSIL file is generated every time a change is made and it happens before CLR.
对于应用程序代码,每次进行更改时都会生成此MSIL文件,并且发生在CLR之前。 For BCL there are already assemblies (MSIL files) existing and in CLR they should be only loaded to the memory.
对于BCL,已经存在程序集(MSIL文件),并且在CLR中应仅将它们加载到内存中。 So the runtime engine locates which exact assemblies should be transformed to platform-specific instrcutions and be loaded to the memory.
因此,运行时引擎确定应将哪些确切的程序集转换为特定于平台的指令,然后将其加载到内存中。
So 所以
The CLR will also interact with the types contained within the .NET base class libraries when required
如果需要,CLR还将与.NET基类库中包含的类型进行交互
that means it'll look which types from BCL are referenced in the code. 这意味着它将查看代码中引用了BCL中的哪些类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.