Comments
1 comment
-
Sorry, but the in-memory object model doesn't have any such information within it.
Source code is generated when the object model is fed through a language writer (for a particular language) which writes the lines to the various files. There's no exposed way for your code to get inside the language writer in order to record location information.
Add comment
Please sign in to leave a comment.
in the Reflector API, is there a way to get the corresponding source code and line from an IStatement or IHasIlOffset?
I would like to be able to display the C# source code directly instead of the C++ code that I generate (by using #line etc...).
Regards,
Olivier