gpt4 book ai didi

c# - C#中各种try-catch有什么区别?

转载 作者:行者123 更新时间:2023-11-30 20:08:46 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
the difference between try/catch/throw and try/catch(e)/throw e

请原谅我的愚蠢,有人知道它们之间的区别吗?

 try
{
return 1 / 0;
}
catch (Exception)
{
throw;
}

 try
{
return 1 / 0;
}
catch
{
throw;
}

 try
{
return 1 / 0;
}
catch (Exception e)
{
throw(e);
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com