在C#中用try/catch捕捉异常后 如何终止程序的下一步运行?

来源:百度知道 编辑:UC知道 时间:2024/05/30 10:13:29
如题

return就好了

Application.Exit();

to exit the application

FormXXX.Close()

to exit the form

return

to exit the method/interrupt eventhandler

在catch语句块中使用break或者exit。

try{

}catch(Exception mye){
return;
}
这么写就可以了!