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

when the exception is thrown it will search for mostly
likely to least likely exception so it will catch in second
catch

Is This Answer Correct ?    11 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are Model Binders in ASP.Net MVC?

699


How route table is created in ASP.NET MVC?

601


How large is the .net framework 3.0?

560


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1977


What is a view engine?

570






explain how you can load related entities in ef (entity framework)?

544


How OS come to know whether to load the .net framework when we run an .exe created using .Net framework?

569


How we can add the CSS in ASP.Net MVC?

579


Explain the 'page lifecycle' of an ASP.NET MVC?

633


When will the .net framework 3.0 be released?

554


Mention what is the difference between “ActionResult” and “ViewResult” ?

578


how do you truncate a table using entity data model?

590


Is .net core replacing .net framework?

476


what is use of entitydatasource control?

607


Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

573