tags:

views:

203

answers:

3

What is the difference between System.Exception vs System.SystemException

+1  A: 

Here, this might help: http://stackoverflow.com/questions/848017/difference-between-application-exception-and-system-exception

SystemException provided as a means to differentiate between exceptions defined by the system versus exceptions defined by applications.

cornerback84
Haha, your edit says exactly what my answer does. :)
Kyle Rozendo
I didn't saw your answer
cornerback84
+3  A: 

Have a look here.

In a nutshell, System.Exception is defined by applications and System.SystemException is defined by the system (.NET Framework).

Kyle Rozendo
+2  A: 

A SystemException is usually reserved for the .NET runtime/framework to use, and not your application code. Basically, don't derive from SystemException when creating your own custom Exception class.

If you are creating your own Exception classes, you should either derive them from Exception or ApplicationException. ApplicationException was originally intended to be used for non-framework exceptions, but it has sort of fallen to the wayside. I believe the framework authors now recommend to derive your custom Exceptions from the base Exception class.

Andy White