When I wanted to look at the IL of the C# code I wrote I used to create a new console application in visual studio and write the code and build it and view the DLL with ILSpy or dotPeek.
These days I’m using LINQPad to view the IL quickly.
Here is the alternative to that hectic setup, Sharplab.
SharpLab is developed by Andrey Shchekin. SharpLab is a similar tool you can use to Run, De-compile (C#, IL, JIT Asm) and visualizing syntax trees. You can also switch the C# language to whatever you want in SharpLab.
And the good thing about SharpLab is that you don’t need any tools except a web browser.
Read More »visualizing stack and heap with SharpLab