Wednesday, 19 August 2015

What is Exception Handling in .Net

        It's a process of stopping the abnormal termination of a program whenever an exception occur and execute  the code that  is not related with exception.

Handling an Exception  : 
                If we want to handle an exception code has to enclosed under some special blocks known as try, catch blocks. Which has to used as following

Syntax :
                 try
                    {
                   --statements which will cause an exception
                   -- statements which should not be executed when an exception occurs.
                    }
               catch(<exception> <var>)
                 {
              -- Statements which should be executed only when an exceptions occurs
                 }
--- < Multiple catch blocks of reuired >--
                
           

No comments:

Post a Comment