Home
Manage Your Code
Snippet: Get Calling Method (C#)
Title: Get Calling Method Language: C#
Description: Retrieves the fully qualified name of the calling method. Views: 273
Author: Jocelyn Oudesluys Date Added: 9/21/2007
Copy Code  
1System.Reflection.MethodBase methodBase = 
2	(new System.Diagnostics.StackFrame(2, false)).GetMethod();
3Console.WriteLine(methodBase.ReflectedType.FullName + "." + methodBase.Name);