这是C#中的低级执行? [英] which is low level excution in c#?

查看:75
本文介绍了这是C#中的低级执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我的问题是对还是错bcoz是C#中的新功能. 请告诉我C#-
中的哪个是低级执行
对象,
类,
组装,
MSIL

??

请解释一下.

急切地等待答案..

解决方案

.NET管理的执行过程包括以下步骤:

1.选择编译器.
为了获得公共语言运行时所提供的好处,您必须使用针对运行时的一种或多种语言编译器.

2.将代码编译为MSIL.
编译会将您的源代码转换为Microsoft中间语言(MSIL),并生成所需的元数据.

3.将MSIL编译为本机代码.

在执行时,即时(JIT)编译器将MSIL转换为本机代码.在此编译期间,代码必须通过验证过程,该过程检查MSIL和元数据,以查明是否可以确定该代码类型安全.

4.运行代码.
公共语言运行时提供了使执行能够进行的基础结构以及在执行期间可以使用的服务.


执行的最低级别(对于用任何语言编写的任何程序)代码,当然.因此,如果您需要一个有用的答案,则应该详细说明您的问题.据我所知,例如在MSIL级别上,从技术上讲,没有更多"的C#语言:它已被翻译成准确的MSIL指令.


i don''t know if my que is right or wrong bcoz i m new in C#.. :(
plz tell me which is low level exection in C#-

object,
class,
assembly,
MSIL

??

plz explain too.

eagerly waiting for answer..

解决方案

.NET managed execution process includes the following steps:

1. Choosing a compiler.
To obtain the benefits provided by the common language runtime, you must use one or more language compilers that target the runtime.

2. Compiling your code to MSIL.
Compiling translates your source code into Microsoft intermediate language (MSIL) and generates the required metadata.

3. Compiling MSIL to native code.

At execution time, a just-in-time (JIT) compiler translates the MSIL into native code. During this compilation, code must pass a verification process that examines the MSIL and metadata to find out whether the code can be determined to be type safe.

4. Running code.
The common language runtime provides the infrastructure that enables execution to take place and services that can be used during execution.


The lowest level of execution (for any program written in any language) is the machine code, of course. So you should elaborate a bit your question if you need a useful answer. For instance at MSIL level, as far as I know, technically there is ''no more'' C# language: it as been translated, exactly into MSIL instructions.


这篇关于这是C#中的低级执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆