使用异常抛出C#。它是否影响性能? [英] Using Exceptions throwing in C#. Does it affect a performance?
问题描述
基本上,问题是:
C#中的异常会影响性能吗?最好避免异常重蹈覆辙吗?如果我在代码中产生异常,是否会影响性能?
Basically, the question is: Do the Exceptions in C# affect the performance a lot? Is it better to avoid Exceptions rethrow? If i generate an exception in my code, does it affect a performance?
对于问题本身的sillins,对不起,
Sorry for the sillines of the question itself
推荐答案
微软开发类库的设计指南是非常宝贵的资源。以下是相关文章:
Microsoft's Design Guidelines for Developing Class Libraries is a very valuable resource. Here is a relevant article:
我也会推荐框架设计指南书从Microsoft Press。它有很多来自设计指南链接的信息,但由MS人员和Anders Hejlsberg自己注释。它给出了很多关于事情的为什么和如何的洞察力。
I would also recommend the Framework Design Guidelines book from Microsoft Press. It has a lot of the information from the Design Guidelines link, but it is annotated by people with MS, and Anders Hejlsberg, himself. It gives a lot of insight into the "why" and "how" of the way things are.
这篇关于使用异常抛出C#。它是否影响性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!