Sunday, May 15, 2005

Reflector for .NET - Recover source code from EXE, DLL file

Few days ago my friend PM me: "Sebastian, help. I clicked cancel on SourceSafe's merge window and my code is now messed up !! I've been working on this file whole day !"
I said - "Relax, did you compile code after that?", "no, I have a lot of errors now" – he replied.
When I heard this I thought "that's good, maybe there is no problem".

I have downloaded the Reflector for .NET
Then I opened a DLL file from his computer, turned on disassembler from Tools menu and bam - we recovered last compiled source code. That was it, the whole day's work was saved.

But this is not the only way you can use the Reflector. You can use it to see how .NET's classes work, for example DataSet or XmlReader. And with better understanding you can use them more efficiently.

Oh, and one more cool thing about Reflector. You can choose language to disassemble to. It can be C#, Visual Basic, Delphi or Intermediate Language.


No comments: