C# Performance on Errors

Posted by pm_2 on Stack Overflow See other posts from Stack Overflow or by pm_2
Published on 2010-05-17T15:47:49Z Indexed on 2010/05/17 15:50 UTC
Read the original article Hit count: 153

Filed under:
|
|

It would appear that catching an error is slower that performing a check prior to the error (for example a TryParse). The related questions that prompt this observation are here and here.

Can anyone tell me why this is so - why is it more costly to catch an error that to perform one or many checks of the data to prevent the error?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Performance