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
Are c# generics the same as c++ templates?
What are the Types of configuration files and their differences
What is difference between virtual and override in c#?
What is sqlcommand in c#?
What is a dimensional array?
Explain how can I get around scope problems in a try/catch?
Why main is static in c#?
Which is faster abstract class or interface in c#?
What is jagged array?
Is string a primitive data type in c#?
What does char mean in c#?
What is the predicate of a sentence?
In gridview in editmode if we want to display information in one combobox based on
What is overriding in c#?
What is difference between int and int in c#?