How to print the current Stack Trace in .NET without any exception?

I have a regular C# code. I have no exceptions. I want to programmatically log the current stack trace for debugging purpose. Example:

public void executeMethod() 
{
    logStackTrace();
    method();
}

7 Answers
7

Leave a Comment