Viewing the IL code generated from a compiled expression
Yes! Use this tool: https://github.com/drewnoakes/il-visualizer This was incredibly useful when I was implementing and debugging Compile, as I’m sure you can imagine.
Yes! Use this tool: https://github.com/drewnoakes/il-visualizer This was incredibly useful when I was implementing and debugging Compile, as I’m sure you can imagine.
The first part of this answer is wrong, I’m only leaving it so that the evolution in the comments makes sense. Please see the EDIT(s). You’re not looking for reflection, but emission (which is the other way around). In particular, there’s a method that does just what you want, lucky you! See TypeBuilder.DefineMethodOverride EDIT: Writing … Read more