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

Why to use Html.Partial in ASP.Net MVC?

828


What is .net framework used for?

789


Is mvc 4 supporting windows azure sdk (software development kit) ?

787


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

793


Explain the advantage of packaging over xcopy in .net?

761


Is dapper faster than entity framework?

756


mention what is code first approach and model first approach in entity framework?

907


When will the .net framework 3.0 be released?

742


I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.

2407


How do you handle variable number of segments in a route definition?

770


Difference between ASP.NET MVC and ASP.NET WebForms?

825


Name a few different return types of a controller action method?

790


Explain how you can send the result back in JSON format in MVC?

776


Explain how to use multiple submit buttons in ASP.Net MVC?

875


Can I remove .net framework?

789