Exception handling in .NET Framework 4.0

How exception handling has changed in .NET Framework 4.0?

E

Expert

Verified

In .NET 4.0, a latest namespace, called System.Runtime.ExceptionServices, has been introduced that consists the  classes for handling exceptions in the better and advanced manner. The classes are as follows:

i. HandleProcessCorruptedStateExceptionsAttribute Class – This class permits managed code to handle a corrupted state exceptions which occur in the operating system. The exceptions cannot be caught by stating the try...catch block. To handle these exceptions, we can apply the attribute to a method which is assigned to handle the exceptions.

ii. FirstChanceExceptionEventArgs Class – It generates the event whenever the managed exception initial occurs in the code, previous to common language runtime start searching for event handlers.

   Related Questions in Software Engineering

©TutorsGlobe All rights reserved 2022-2023.