Exception handling in c# with example

Posted by Sekar.C under C# on 3/15/2012 | Points: 10 | Views : 3055 | Status : [Member] | Replies : 3
hi,
Exception handling in c# with example

regard
sekar.c

Regards
Sekar.c



Responses

Posted by: Hmanjarawala on: 3/15/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,
here is sample block:

try
{
int a = 5;
int b = 0;

int c = a / b;
}
catch (DivideByZeroException e)
{
//Code for handling this exception
}
catch (Exception e1)
{
//Code for handling this exception
}




Mark this as answer, if it helps you....................

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/15/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Sekar,
An additional link for you.
http://www.c-sharpcorner.com/UploadFile/rajeshvs/ExceptionHandlinginCSharp11282005051444AM/ExceptionHandlinginCSharp.aspx

Thanks,
Sanjay

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response