How to log all frames in a call stack for a console based application?
I am aware of this code:
StackTrace stackTrace = new StackTrace();
StackFrame[] stackFrames = stackTrace.GetFrames();
stackFrame.GetMethod().Name;
But I want to log all the methods that are being executed and log the start of the function and end of the function.
We have lots of files and methods and with a minimal change i wish to log the start & end of functions without touching the actual methods.
If we can write seperate interface and just a statement in the main function it would be of great help.
Any suggestions would be appreciated.