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 / mathew m
it will give error
previous catch clause already catches all exceptions of
this or of a super type ('System.Exception')
b"z System.Exception is the MOTHER -"mathaji" of all
exception.So all will be caught intitally,after that no
exception remains...it will be ok if we put child exception
like "SQLQueryException" before Exception [mathaji:)]
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
what is ssdl?
List out few different return types of a controller action method?
What is object service? : Entity framework
What is Attribute Routing in ASP.Net MVC?
What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?
what is entityclient?
What are action filters?
What is viewdata?
Is dapper better than entity framework?
what is entity framework?
What happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?
what is linq to entities?
How does the .net framework 3.0 relate to windows vista?
Explain the difference between viewbag and viewdata in mvc?
What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?