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 is il and c#?
Explain me what is encapsulation?
Explain the different types of proxy patterns?
Is the COM architecture same as .Net architecture? What is the difference between them (if at all there is)?
What is STA in .NET?
Write the .net syntax for 'while loop'?
Please explain is the jit an interpreter?
What is the use of system.diagnostics.process class in .net?
Is there a way to suppress the finalize process inside the garbage collector forcibly in .net?
What is static constructor, when it will be fired?
What is manifest in .net?
State the various features present in .NET?
How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
Which namespace is used to support multithearding in .NET?
What is deferred execution vs. Immediate execution in linq?