Catching and Throwing Standard Exception Types The following
guidelines describe best practices for some of the most commonly
used exceptions provided by the .NET Framework. For a complete
list of exception classes provided by the Framework, see
thedocumentation. Exception and SystemException Do not throw
System.Exception or System.SystemException. Do not catch
System.Exception or System.SystemException in framework code,
unless you intend to re-throw. Avoid catching System.Exception
or System.SystemException, except in top-level exception
handlers. If you are designing an application that needs to
create its own exceptions, you are advised to derive custom
exceptions from theclass. It was originally thought that custom
exceptions should derive from the class; however in practice
this has not been found to add significant value. For more
information, see . Do throw a System.InvalidOperationException
exception if in an inappropriate state.
System.InvalidOperationException should be thrown if a property
set or