My scenario: I want to write in log file part of code where exception has happened (for example 5 lines before and 5 lines after line where exception happened - or at least all the code of that method).
My idea is to decompile pdb file in C# code and from that decompiled file find a method that went in exception in catch block.
Pbd file exists and my app is build as debug version. I know that there are tools that allows through its GUI (for example Reflector) to do decompiling but I want to have that functionality from my code.
How to do it?