public static class ReflectionHelper
{
....
public static StackFrame GetCallingMethod(bool getFileNames)
{
StackTrace st = new StackTrace(true);
/// When it is placed in the separate class we use 2 as constant
return st.FrameCount > 2 ? st.GetFrame(2) : null;
}
}