Hi,
Requirement is:
try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}
Got Exception in "try" block. Which "catch" throws
exception and Why???
Please provide the answer in detail..
Thanks for the help!!!
Answer Posted / syed
The generic exception (Catch(Exception e)) should be
written after all the specific exceptions are written.
if any specific exception is written after the general
exception that will be of no use, as for all the exceptions
that were encountered in the try block will be catched by
the generic exception.
hope u got it.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to manage pagination in a page using .net?
Explain how to stop a thread?
Please explain is the jit an interpreter?
What is the use of UML in .Net
Explain cas (code access security)?
Explain the procedure to add assemly to gac to make it shared one?
What is dot net and its uses?
Explain the main components in .net?
Explain what is an anonymous method and how is it different from a lambda expression?
What are data types in .NET?
Explain Creational design pattern in .NET?
What's the .net collection class that allows an element to be accessed using a unique key?
What is static constructor, when it will be fired?
How do I use the thread pool?
What is interface and abstract class in .net?