OpenUser
OpenUser

Reputation: 158

How can I decompiling IL code of .net framework

I want to investigate IL code of most .net framework library classes. Is it possible? I am trying to decompiling some dll (e.g.: System.Treading), and I only see signature of the functions. Then I go to mscorlib.dll and see only manifest. There is a way to see the real code?

Upvotes: 4

Views: 1924

Answers (3)

sayah imad
sayah imad

Reputation: 1553

Personnaly to decompile IL code i use ILspy , it's lightweight tool and easy to use .

you can found it in the link below :

https://sourceforge.net/projects/ilspyportable/

Best Regards .

Upvotes: 2

user12031933
user12031933

Reputation:

You can use .NET Reflector (commercial but very good):

https://www.red-gate.com/products/dotnet-development/reflector/

You can open a .net assembly with it (.exe or .dll).

So you can also directly browse .NET Framework assemblies by selecting the framework version.

Select view IL or other language such as C# or VB code and it is done.

There is also for example this free tool (slow, very slow):

https://www.jetbrains.com/decompiler/

Upvotes: 3

GvS
GvS

Reputation: 52518

If you want to study the implementation of .Net classes. I suggest you use the reference code provided by Microsoft.

The main advantage of using the reference code, is that you can see the comments and other elements that will not be added to IL (like #define).

Reference Source

To study the effect of certain C# constructs on the generated IL, I would suggest using SharpLib.

SharpLib

Upvotes: 2

Related Questions