C#反编译器如何工作 [英] How does c# decompiler work

查看:71
本文介绍了C#反编译器如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对诸如ILSpy或.Net Reflector等反编译器感兴趣。

i am interested in decompilers like ILSpy or .Net Reflector and etc.

有人可以告诉我此反编译器如何将用C#编写的exe或dll文件转换为原始文件。

Can anybody tell me how this decompiler convert exe or dll files written in c# to its original source code?

推荐答案

这里有两个关键点。

首先,IL虽然是C#或VB.NET的较低级语言,但比汇编器或机器代码要高得多。许多高级构造仍然存在,可以相对容易地用于确定代码的流程和操作。

Firstly, IL, while a lower level language that C# or VB.NET, is a much higher level than assembler or machine code. Many high level constructs are still in place and can be used relatively easily to determine the flow and operation of the code.

另一个关键点是,反编译器不会生成原始源代码。它从低级IL生成高级语言构造,通常与原始源代码非常相似,但不完全相同。

The other key point, is that a decompiler does not generate the original source code. It generates high-level language constructs from the lower-level IL, which, typically are very similar to the original source code, but not identical.

这篇关于C#反编译器如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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