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

Can private virtual methods be overridden in c#.net?

698


Which programming language is best for desktop applications?

669


What are primitive data types in c#?

701


State the top.NET class that everything is derived from?

714


What is a .exe extension files? How is it similar to .dll extension files?

776


what is a static constructor?

862


What is the keyword used to prevent a class from being inherited by another class?

898


What is c sharp language?

700


What is the difference between the debug class and trace class? Documentation looks the same.

727


What is out int in c#?

656


What exactly happens when we debug and build the program?

2359


What are the properties of c#?

680


Why use “using” in c#?

719


Define sealed classes in c#?

696


What is binding in c#?

665