Runtime Stack Introspection with C#

        public static string WhoCalledMe()
        {
              var st = new StackTrace();
              var sf = st.GetFrame(1);
              var mb = sf.GetMethod();
              return mb.Name;
        }

Leave a comment