111,093
社区成员




try
{
throw new Exception();
}
catch (Exception)
{
}
// Do finally
try
{
throw new Exception();
}
catch (Exception)
{
}
finally
{
// Do finally
}
protected void Button1_Click(object sender, EventArgs e)
{
string id= Request["id"];
try
{
FileHelper.CopyFileForAudit(id);
}
catch (Exception ex)
{
RunJs("alert('上传文件不存在,文件未更新。但更新状态已改变');");
}
Data.Instance.UpdateImage(id);
RunJs("window.close()");
}
'finally 是必走
try
{
throw new Exception();
}
catch (Exception)
{
}
finally
{
msgbox("123")
}
'只要开始了 try 他都走finally
'不管怎么样 总是会弹出 123 的