MethodBody.GetILAsByteArray(); returns IL-code in byte representation, this is clear. However, I did not find specifics in the description of the operation of this method on MSDN : does it return the " verbatim " instruction that I described, or does this function return the instruction that will be executed?
I will explain:
- In Debug mode, the compiler does not optimize the code, so
executable instruction is identical to the one described by myself
programmer. - In Release mode, the same compiler inlineit, eliminates and in general
changes many things so that the final executable instruction can
seriously differ from what was originally described.
Does GetILAsByteArray() a compilation mode, or does this method always return a " verbatim " method instruction?