views:

183

answers:

2

I have a class with a few methods and I would like to see how the code is converted to IL code. Can I do this using the reflector? If not, can I use VS IDE to view the IL code?

+6  A: 

Yes you can. Open the exe/dll with Reflector and change the language setting to IL.

JTA
Excellent, got it. On a side note, by changing the language, we can use the reflector as a language convertor? (say from C# to VB.NET)
Yes, kind of. It doesn't always work, as there are some things in C# that don't map well to VB, for example, things like iterators, but generally speaking, you can use it as a converter. The following Reflector Add-On will convert a whole assembly into source files of the desired language: http://www.denisbauer.com/NETTools/FileDisassembler.aspx
Judah Himango
+3  A: 

You can also use ILDasm to disassemble the assembly to IL.

Andrew Hare