c# 获得方法的调用者的调用者的类名,方法名
public class SeleniumUtil { public static void getFileName() { StackTrace trace = new StackTrace(); StackFrame frame = trace.GetFrame(1);//1代表上级,2代表上上级,以此类推