Unchecked Exceptions in C#
Posted on September 22, 2006
I was playng with C# and I found something I do not understand.
What is the strategy of working with unchecked exceptions in C#? I mean it’s nice that socket timed out, and I now know about potential error. But my method does not indicate in it’s contract that it may throw an exception, so if I will try to use sombody else code, how can I be sure that I won’t get a surprise exception?
So my questions are:
- How can I get a set of exceptions method can throw.
- Can I make Visual Studio show me that I am calling potentially dangerous code?
- Can I automatically surround method call with try/catch construct that catches every specific exception in VC# Express 2005.
- What is the reasoning behind unchecked exceptions if you still have to catch them?
Filed Under Uncategorized | Leave a Comment
Leave a Comment
If you would like to make a comment, please fill out the form below.