Requirement is:
try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}
Qu)I Got Exception in "try" block. Which "catch" statement
(i.e. 1st catch or 2nd catch ) catches the exception and
Why???
Answer Posted / sathish
There will be compile time error, becuase
the "..........catch(Exception ex)..........." is generic
exception block, where all type of exceptions are caught,
so when "catch(Exception ex)" is placed in the beginning,
then the following compile time error is thrown.
"A previous catch clause already catches all exceptions of
this or of a super type ('System.Exception')"
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
When will the .net framework 3.0 be released?
Which version of .net framework is installed?
What is MVVM design pattern?
What is mvc entity framework?
Can you explain model, controller and view in mvc?
mention what are the various methods provided by the dataset object to generate xml?
Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?
Explain the tools used for unit testing in ASP.Net MVC
What is the difference between .net core and .net framework?
How to update one of my table in database at 4pm every day how it is possible?
What is mapping in entity framework? : Entity framework
What is meant by bootstrap in mvc5?
Is it possible to cancel filter execution?
What is viewbag title?
What is poco proxy? : Entity framework