Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Compiled code

Is there any way to see the compiled code output 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 the visual studio. so i can decide what is the best coding approach for certain task by looking at the output code.

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

Updated:


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

like image 682
Chamika Sandamal Avatar asked Mar 31 '13 19:03

Chamika Sandamal


1 Answers

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

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


If, however, you are talking about viewing IL for .NET languages - ILDASM can show it to you, as will most disassemblers (such as Reflector). Many of these will show you their C# / VB.NET interpretation of the IL by default, but you can always view the IL directly.

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

like image 65
Oded Avatar answered Oct 26 '22 23:10

Oded