Return to Snippet

Revision: 43105
at March 17, 2011 02:08 by wallybh


Initial Code
using System.Diagnostics;

// get call stack
StackTrace stackTrace = new StackTrace();

// get calling method name
Console.WriteLine(stackTrace.GetFrame(1).GetMethod().Name);

Initial URL
http://www.csharp-examples.net/reflection-calling-method-name/

Initial Description
Get the  calling method using reflection.

Initial Title
Get Calling Method using Reflection

Initial Tags


Initial Language
C#