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
upgrade to c# 5 and use CallerMemberName
CallerMemberName
public void Method([CallerMemberName] string caller="") { }
EDIT
Other nice things with c# 5
public void Method([CallerMemberName] string name="", [CallerLineNumber] int line=-1, [CallerFilePath] string path="") { }