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
Can private virtual methods be overridden in c#.net?
Which programming language is best for desktop applications?
What are primitive data types in c#?
State the top.NET class that everything is derived from?
What is a .exe extension files? How is it similar to .dll extension files?
what is a static constructor?
What is the keyword used to prevent a class from being inherited by another class?
What is c sharp language?
What is the difference between the debug class and trace class? Documentation looks the same.
What is out int in c#?
What exactly happens when we debug and build the program?
What are the properties of c#?
Why use “using” in c#?
Define sealed classes in c#?
What is binding in c#?