Is it possible to insert IL code to C# method?
DynamicMethod is the lightweight way to accomplish this at runtime.
The Microsoft C# compiler doesn't support injection of IL at compile-time, but a code-weaving tool could do so as a post-compile step.