/ Published in: C#

GetFrame(1) to avoid the last method being this property accessor.
Note that in a child class inherited member, the Class name will be the name of the type containing the implementation.
Note that in a child class inherited member, the Class name will be the name of the type containing the implementation.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
protected string Source { get { MethodBase mb = st.GetFrame(1).GetMethod(); return mb.ReflectedType.Namespace + "." + mb.ReflectedType.Name + "." + mb.Name; } } //Use like so: public void DoChildStuff() { Log(Source, "Doing Child Stuff"); }
Comments
