Reducing Try Catch Block will Improve the Performance ?
Reducing Try Catch Block will Improve the Performance ?, can any body explain how the try catch block internally works, does it do any additional work if we put our code inside it ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Sep 2, 2010, 10:45 AM EDT
Exception Handling in C# by Rajesh VS
Getting Started with Exception Handling in C# by Suprotim Agarwal
Other Links:
http://www.programmersheaven.com/user/pheaven/blog/175-Do-trycatch-blocks-hurt-runtime-performance/
http://msmvps.com/blogs/peterritchie/archive/2007/06/22/performance-implications-of-try-catch-finally.aspx
http://www.blackwasp.co.uk/SpeedTestTryCatch.aspx
Mahesh ChandRank #1 · 393.3K reputationPosted Sep 2, 2010, 11:10 AM EDT
For example, if there is some code like this.
string s = "mahesh";
It would not make sense to put a try..catch around this code.
Dipal ChoksiRank #199 · 12K reputationPosted Sep 9, 2010, 12:07 AM EDT
Here are some interesting discussions on this topic:
http://msmvps.com/blogs/peterritchie/archive/2007/06/22/performance-implications-of-try-catch-finally.aspx
http://www.programmersheaven.com/user/pheaven/blog/175-Do-trycatch-blocks-hurt-runtime-performance/