Tell me something about Exceptions. What is the common
exception class?

Answer Posted / tiger kumar

Exception is used to handle the errors during the runtime of
the process.It has the three parts.Try,Catch,Finally.The try
is the part of the set of code.Whenever the errors occur in
the Try block it comeout from the try block and the catch
block handles exception class the error.
Finally is little differ from the catch.Because Finally is
must executable part whether it has error or not.

Mostly which is used for close the objects.

try
{
int i =10;
int sum =i/0;
Response.Write("sum is:"+sum);
}
catch(Exception oEx)
{
Response.Write("Error:"+oEx.ToString());
}
catch(DivideByZeroException oEx1)
{
Response.Write("Error:"+oEx1.ToString());
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lazy keyword in c#?

526


Define an escape sequence, name few strings in escape sequence?

475


What is autopostback in c#?

472


What is the difference between a variable and a literal?

534


Why dependency injection is used in c#?

489






What is difference between out and ref in c#?

532


What are abstract classes in c#?

484


What is a cs file?

515


What is the purpose of dependency injection?

474


What is hashtable c#?

471


What are the benefits of using generics in c#?

477


Can datetime be null c#?

484


What are the features of c#?

504


Name the two classes are required for implementing a windows service?

546


What is the symbol used for in c#?

493