I need to get the name of the calling function in C#. I read about stackframe method but everywhere its said its not reliable and hurts the performance.
But I need i
You can do something like:
var stackTrace = new StackTrace(); var name = stackTrace.GetFrame(1).GetMethod().Name;
and it work with any version of the framework/language.