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 tempdata?
How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?
What does mvvm mean?
differences between poco, model first and data first approach?
How we can register the Area in ASP.Net MVC?
How to update one of my table in database at 4pm every day how it is possible?
Can we free memory explicitly without waiting for garbage collector to free the memory in .net compact framework?
What is the difference between .net core and .net framework?
What is the difference between old ADO.NET and Entity framework coding techniques?
How to change the action name in mvc?
i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?
Is it possible to share a view across multiple controllers?
What symbol would you use to denote, the start of a code block in razor views?
Explain Bundle.Config in ASP.Net MVC4?
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?