c#中的异常处理

来源:互联网 发布:秒杀 淘宝 编辑:程序博客网 时间:2024/05/01 14:10

 1 捕获异常的语句有 try catch以捕获溢出异常为例

try

{

for(;,n<max,n++)

sum*=n;

}

catch(OverfolwException oe)

{

Console.Write("over");

return;

}

原创粉丝点击