使用ildasm获取源代码
.NET code (C#, VB, F#, etc) compiles (for the most part) into Intermediate Language (IL) and then makes it way to native code usually by Just-in-time (JIT) compilation on the target machine. When you get a DLL/Assembly, it's pre-chewed but not full juiced, to mix my metaphors.
.NET代码(大部分是C#,VB,F#等)会编译为中间语言(IL),然后通常通过在目标计算机上进行即时(JIT)编译将其转换为本地代码。 当您获得DLL /程序集时,将其进行预咀嚼但未完全溶解,以混合我的隐喻。
Often you'll come along a DLL that you want to learn more about. Sometimes you'll want to just see the structure of classes, methods, etc, and other times you want to see the IL - or a close representation of the original C#/VB/F#, etc. You're not looking at the source, you're seeing a backwards projection of the IL as whatever language you want. You're basically taking this pre-chewed food and taking it out of your mouth and getting a decent idea of what it was originally.
通常,您会遇到想要了解更多信息的DLL。 有时,您只想看一下类,方法等的结构,而有时又想看一下IL-或原始C#/ VB / F#的近似表示,等等。您不是在看源代码。 ,无论您想要哪种语言,您都会看到IL的向后投影。 您基本上是在将这种预先咀嚼的食物从嘴里拿出来,对它的原味有个不错的了解。
I've used ILDasm for years, but it's old and lame and people tease you for using it because they are cruel. ;)
我已经使用ILDasm多年了,但是它又老又la脚,