如果try/catch
块中没有抛出异常,try
是否会影响性能?try/catch/finally
怎么样?
最佳答案
try/catch
和try/catch/finally
都不会在很大程度上影响性能。当然,所创建的异常确实会影响性能(这就是是否捕获到异常)
Do try/catch blocks hurt performance when exceptions are not thrown?
关于.net - try catch子句会影响性能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4492344/