Author: mlbrillo | Posted on: 11/25/2009 11:47:46 AM | Views : 281

I have recently inherited some code that is unlike any I've ever seen.  There are so many try/catch blocks that it makes my head spin.  I've never been one to use try/catch blocks for catching errors in my code, I generally use an if/else approach; if it fails, do this...else keep going. 
It seems entirely unnecessary to stick a try/catch around every...single...thing I do, like this code does.  As I said above, I've never been one to use them and I'm a little embarassed to say that, after 7+ years of programming in .NET, I'm not sure I understand when the best time to use them would be.
Can anyone shed light on which situation would be the best to use a try/catch block?  I feel this code is overusing them...however I HAVE been wrong on previous occasions.  :)

Any help is appreciated.  Thanks in advance and Happy Thanksgiving!

...

Go to the complete details ...