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 Event - Delegate? clear syntax for writing a event delegate
How to manage pagination in a page using .net?
Different levels of priority provided by .net.
Explain the difference between .net 2000 and .net 2005(features)? Which one is better?
What is Code group in .Net with respect to CAS
How do you instantiate a complex number?
What is close method? How its different from finalize and dispose?
What is file extension of Webservices in .Net?
What is the purpose of IClonable interface in .NET?
What is meant by globalization and localization?
Explain about .NET services?
What is .net technology?
Tell us why do we use the “using” statement?
What is the difference between reference type and value type?
i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net