I know it was possible to use:
System.Diagnostics.StackTrace t = new System.Diagnostics.StackTrace();
but that seems to not work anymore, as it needs an Exception-Object.
See Question&Answers more detail:osI know it was possible to use:
System.Diagnostics.StackTrace t = new System.Diagnostics.StackTrace();
but that seems to not work anymore, as it needs an Exception-Object.
See Question&Answers more detail:osTry Environment.StackTrace. Just remember to be careful with what your logic afterwards is as stacks can change in unpredictable ways. Some discussion here: https://github.com/dotnet/corefx/issues/1420