Monday, July 2, 2012

Handle Exceptions in .NET 2.0


Explain how to Handle Exceptions in .NET 2.0.


There are different methods for handling the exceptions. For example


Method 1 :


try
{
     // code here
}
catch(Exceptiontype *etype_object)
{
     // code here.
}


Method 2 :
try
{
       // code
}
catch(Exceptiontype *etype_object)
{
        throw new Custom_Exception();
}

No comments:

Post a Comment