Answers for "get calling method name of function in C#"

C#
2

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].
Posted by: Guest on November-27-2020

Code answers related to "get calling method name of function in C#"

C# Answers by Framework

Browse Popular Code Answers by Language