Friday, 28 June 2013

C# Exception Handling tutorial for begginers

     Exception handling is used to handle runtime errors using try catch block.Generally these errors occurs due to various reasons like wrong input given by the user,wrong implementation of logic,missing of required resourses etc.
     These errors are very dangerous because, We phase them in the middle of the program. When ever runtime error occur the program terminates abnormally without executing the next lines of code.
    If at all we want to handle an exception we must enclose the code under try catch block.

  syntax:
try
{
-statements which causes runtime error
-statements which does not require execution if any runtime errors occur
}
catch(exception var)
{
-statements which require execution only when runtime errors occur
}

 click here for more information about c# exception

No comments:

Post a Comment