use*_*912 1 c# try-catch throw
可能重复:
为什么在C#中捕获并重新抛出异常?
我一直在寻找网络,试图找到这个问题的答案 - 两者之间有什么关系?
try
{
//Do Something
}
catch
{
throw;
}
Run Code Online (Sandbox Code Playgroud)
VS
try
{
//Do Something
}
catch
{
}
Run Code Online (Sandbox Code Playgroud)
要么
try
{
//Do Something
}
catch (Exception Ex)
{
//Do something with Exception Ex
}
Run Code Online (Sandbox Code Playgroud)