Sie Ste

Sie Ste

  • NA
  • 196
  • 179.4k

Error Handling

Nov 1 2011 11:42 PM
In a C#.net 2010 application that I am suppose to maintain (since I am new to working with this language), I find code that looks like the following:
 try 
{ //do something} 
  catch (ex){}
In the visual studio ide, I see a a curly green  under the ex.
I also do not see any  using statement that I would think applies.
Thus can you tell me if this kind of code really catches any errors? if so can you explain it to me?
I put this kind of code around some of my new code and everything falls into the catch block.
Thus can you tell me what a "good" try catch block should  look like aand what namespace should be included in the
using statement?

Answers (3)