2
Reply

What’s difference between System exceptions and Application exceptions

sanjeev singh

sanjeev singh

15y
16.9k
0
Reply

    Please refer to the following URL to know the differences between System Exceptions and Application Exceptions,http://onlydifferencefaqs.blogspot.in/2012/08/dotnet-framework-difference-faqs-3.html

    There r 2 important classes in the hierarchy that r derived from System.Exception:
    1) System.SystemException -> This class is for exceptions that r usually thrown by the .net runtime, or which r considered to be of a generic nature and must be thrown by almost any application. For example, StackOverflowException will be thrown by the .net runtime if it detects the stack is full. On the other hand, u might choose to throw ArgumentException or it’s subclasses in ur code, if u detect that a method has been called with inappropriate arguments. Subclasses of System.SystemException includes classes that represent both fatal and non-fatal errors.

    2) System.ApplicationException-> This class is important, becoz it is the intended base for any class of exception defined by third parties. Hence, if u define any exceptions covering error conditions unique to ur application, u should derive these directly or indirectly from System.ApplicationException