Look at StackTrace classSateesh Arveti16yPublished Jul 14, 2010, 12:00 AMUpdated Jul 14, 2010, 5:05 AM7.1k00Reactions×25Blog 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: for (int i = 0; i < new StackTrace().FrameCount; i++){Console.WriteLine(new StackTrace().GetFrame(i).GetMethod().Name);}CommentsJoin the conversation! Your thoughts help the community grow.Sign in to leave a commentIt is the same account you read, post and publish with — and you will come straight back to this page.Sign inCreate an account
Join the conversation! Your thoughts help the community grow.