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 / parikshit

it will give compile time error as, the sequence of
exception class has to be Most Specific => General.

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are the important namespaces used in ASP.Net MVC?

689


What is entitytype? : Entity framework

614


What are actions in mvc?

652


What is renderbody?

633


Explain representational state transfer (rest) in detail?

652






Will the name change be reflected in any of the existing .net framework 2.0 apis, assemblies, or namespaces?

641


What is the .net framework and how does it work?

642


How route table has been created in ASP.NET ASP.Net MVC?

635


Are there any parts of the .net framework 3.0 that only work on windows vista?

672


Can you explain model, controller and view in mvc?

655


Explain the difference between Viewbag and Viewdata in ASP.NET MVC?

682


Possible ways to prevent xss attacks on mvc application?

644


what is use of entity container?

698


What is filters in web api?

594


Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

595