【发布时间】:2014-10-19 00:21:00
【问题描述】:
我从事一个伐木项目。我想将方法的参数值保存在数据库中。我怎样才能得到这些值。我想在 FirstChanceException 事件中获取“Test”方法的参数值。
class Program
{
private static void Main(string[] args)
{
AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
Test(100);
}
private static void Test(int i)
{
throw new OverflowException();
}
private static void CurrentDomain_FirstChanceException(object sender,
System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs e)
{
//I Want To Get Parameter Value of Test Method
}
}
【问题讨论】:
-
关于这里的许多其他问题...你不能。
标签: c# exception logging exception-handling aop