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
What do you mean by Code Access Security in .NET?
Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?
What is "common language runtime" (clr) in .net?
Explain me what is encapsulation?
How can I find out what the garbage collector is doing?
Explain .NET architecture?
Explain about managed heap?
Explain what is a delegate?
object is physical and class is logical..here class is not occupying any memory as our definition of class but i got a question then the class where it stores if it is not occupying any memory....
Explain difference between panel and groupbox classes using .net?
Elements of CAS
What is difference between .net and .net core?
Compare client server application with n-tier application
What tools is used to develop .NET applications?
Explain me what is the .net framework and how does it work?