Joel Holder

Math, coding, philosophy, art, and other things that interest me

View on GitHub
13 March 2011

Runtime Stack Introspection with C#

by Joel Holder

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

tags: