I've recently been tasked with adding logging statements to every method call in a solution. These log entries need to contain the class and method name.
I know I can use MethodBase.GetCurrentMethod()
and the StackFrame.GetMethod()
methods. Which is better? Is there a better (or more performant) way to get the class and method name?