Visual Studio Compiled Code

Is there any way to see the result of the compiled code from the visual studio itself. I know that we can use some reflector software and see the code. but I just want to see the compiler code while coding in a visual studio. so I can decide what is the best coding approach for a specific task by looking at the output code.

Note: support for C # would be enough for me.

Updated:


I want to see the result of Intermediate Language (IL) C # code.

+7
source share
1 answer

Assuming you are not talking about .NET languages ​​(C #, VB.NET, F #, etc.), you can use the disassemble window:

The Disassembly window shows the assembly code that corresponds to the instructions generated by the compiler. If you are debugging managed code, these assembly instructions correspond to the native code generated by the Just-in-Time (JIT) compiler, not the Microsoft Intermediate Language (MSIL) generated by the Visual Studio compiler.


If, however, you're talking about viewing IL for .NET languages ​​- ILDASM can show it to you, like most disassemblers (such as Reflector). Many of them will show your default interpretation of IL / VB.NET IL, but you can always view IL directly.

Some of them also have Visual Studio add-ons / extensions that let you see disassembly directly in Visual Studio (Reflector and Resharper will both do this).

+13
source

All Articles