What is Exception Handling?
Hi,I want to introduce Exception handling.
Exceptions are nothing but,runtime errors.to catch the Exceptions at runtime developers had introduced this concept called Exception handling.Exception handling in .net is done using Try .. Catch.
Syntax for this is,
C# Code
try
{
//Problematic statements.
}
catch(ExceptionName objectname)
{
//User friendly error message;
}
finally // is Optional
{
//Always Runs
}
VB Code
Try
'Problematic statements.
Catch ex as Exception
'User friendly error message;
Finally 'Is Optional
'Allways Runs
End Try
this is just syntax always try to convey your message by sample code, hope you don't mind