Jump to content
Xtreme .Net Talk

FVCbr

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by FVCbr

  1. According to the .NET Framework Standard Library Annotated Reference, you should always derive from System.Exception. And they have a valid point. it's just that it is another layer in the hierarchy that doesn't add any real information or utility itself. Here's what Brad Adams posted about it: The only reason that you would derive from ApplicationException is if you wanted to catch all ApplicationException derived exceptions for some reason: // This is bad try { // may throw ApplicationException derived exceptions } catch ( ApplicationException) { // handle all application specific exceptions } The problem with this is that it is always a bad idea to catch at this high a level. In other words, it is almost never useful to handle all exceptions defined by your application in the same way. It tends to hide bugs. Specific exceptions should be caught instead. If you want more info go to : http://blogs.msdn.com/brada/archive/2004/03/25/96251.aspx
  2. Michael Weinhardt has an excellent article on MSDN that deals exactly with that. You should definitely take a look. It is a 3 part article and here's the link for the 1st one: http://msdn.microsoft.com/library/default.asp?url=/code/list/winforms.asp I hope that helps. (It should!)
×
×
  • Create New...