how to get the calling method name in c# code example
Example: c# get calling method name
//using System.Runtime.CompilerServices;
public void SendError(string Message, [CallerMemberName] string callerName = "")
{
Console.WriteLine(callerName + "called me.");
}
// You can also get the [CallerFilePath] and [CallerLineNumber].