17,740
社区成员
发帖
与我相关
我的任务
分享
public static TryCatch(Action action)
{
try
{
action();
}
catch(TestException)
{
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
TryCatch(()=>throw new TestException());
try
{
throw new TestException();
}
catch(TestException)
{
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}