Run it through a disassembler such as ILDasm, JustDecompiler or dotPeek.
how to get the assembly code of the code?
I want to get the assembly code of the code how to do it using .net?
If I have one code:
int i = 10;
how to get its assembly code
mov eax 10;
ret;
2 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 74,451 Reputation points
Dec 19, 2022, 5:27 PM .net code is only converted to assembly at runtime. to see the assembly, you need a debugger that supports the display.
visual studio has one. under debug options enable address level debugging and use the disassembly window:
visual studio code debugger also has support:
https://www.strathweb.com/2020/05/decompilation-support-in-omnisharp-and-c-extension-for-vs-code/