使用异常在C#中投掷。它会影响性能? [英] Using Exceptions throwing in C#. Does it affect a performance?

查看:163
本文介绍了使用异常在C#中投掷。它会影响性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,问题是:
执行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?

对不起,这个问题本身

推荐答案

微软的设计准则类库开发是一个非常宝贵的资源。下面是相关文章:

Microsoft's Design Guidelines for Developing Class Libraries is a very valuable resource. Here is a relevant article:

异常和性能

我也推荐的框架设计准则从微软出版社的书籍。它有很多的从设计指南链接的信息,但它是由MS患者,和安德斯·海尔斯伯格,他自己注解。它提供了很多有识之士到

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆