Make use of the stack trace
As you’re debugging and stepping through your code in Visual Studio, you will no doubt have come across the Call Stack window in Visual Studio: You can get access to the same stack trace information using the StackTrace and StackFrame class and this opens up some interesting possibilities. For instance, you can have a Log …