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.
Try 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
1.4m articles
1.4m replys
5 comments
57.0k users