public string CallingMethod
{
get
{
StackFrame sf;
StackTrace st = new StackTrace(true);
StringBuilder oString = new StringBuilder();
for(int i =1; i< st.FrameCount; i++ )
{
// Note that high up the call stack, there is only
// one stack frame.
sf = st.GetFrame(i);
oString.Append("METHOD: " + sf.GetMethod());
oString.Append(" Line Number: " + sf.GetFileLineNumber() + AppUtils.StringSeperator);
}
return oString.ToString();
}
}
|