new StackTrace().GetFrame(1).GetMethod().Name returns the calling method name. This information will help in tracing. We can see call hierarchy of a method by using below code:
Code |
StackTrace class of System.Diagnostics helps us to interpret stack trace to get calling method name, local variables etc.
Code |
Join the conversation! Your thoughts help the community grow.