tags:

views:

56

answers:

1

Hi ,

I have an app written in C#. It was already compiled.

There are plenty of dll files there and i could not open them , decompile them cannot see and access C# code which build them, when i add a reference to dll files in Visual Studio i only can see what methods are there, but i cannot see / access code of those methods.

Is there a tool or is there a way how to see / access that code , modify it and then recompile it ?

Please if you have an idea give me a hand !

Thanks

+4  A: 

The easiest way to do this is through Reflector - it is not perfect, but will give you a good idea.

It lets select an assembly and display it in either IL, vb.net or C#. You can copy/paste the result into Visual Studio and compile it with your changes.

Because it works on the raw optimized IL, things like foreach loops can end up as labels and gotos and variables names can end up as invalid C#/vb.net variables names (though they are valid IL).

I have used it in the past, and the biggest issue is in reconstructing foreach loops, though the pattern becomes apparent after several of those, and the variable names can be changed with a search/replace.

Oded