Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# get function name

public static String GetCallingStack()
        {
            try
            {
                StackTrace stackTrace = new StackTrace();
                return stackTrace.GetFrame(1).GetMethod().Name;
            }
            catch(Exception e)
            {
                return "";
            }
        }
 
PREVIOUS NEXT
Tagged: #function
ADD COMMENT
Topic
Name
1+7 =