Using Exceptions throwing in C#. Does it affect a performance?

后端 未结 8 916
余生分开走
余生分开走 2021-01-13 01:58

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 a

8条回答
  •  無奈伤痛
    2021-01-13 02:38

    Exceptions in .NET do affect performance. This is the reason why they should be used only in exceptional cases.

提交回复
热议问题