public static void test(string t)
{
int i = 0;
while (true)
{
try
{
StackTrace ss = new StackTrace(true);
MethodBase methodNam = ss.GetFrame(i).GetMethod();
_log.Error("当前i值为:" + i.ToString());
_log.Error(methodNam.Name );
if (i>5)
{
break;
}
i++;
}
catch (Exception)
{
break;
}
}
}
{
int i = 0;
while (true)
{
try
{
StackTrace ss = new StackTrace(true);
MethodBase methodNam = ss.GetFrame(i).GetMethod();
_log.Error("当前i值为:" + i.ToString());
_log.Error(methodNam.Name );
if (i>5)
{
break;
}
i++;
}
catch (Exception)
{
break;
}
}
}