Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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


Please Help Members By Posting Answers For Below Questions

What is tempdata?

1047


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?

966


What does mvvm mean?

958


differences between poco, model first and data first approach?

1216


How we can register the Area in ASP.Net MVC?

1104


How to update one of my table in database at 4pm every day how it is possible?

1035


Can we free memory explicitly without waiting for garbage collector to free the memory in .net compact framework?

999


What is the difference between .net core and .net framework?

984


What is the difference between old ADO.NET and Entity framework coding techniques?

1005


How to change the action name in mvc?

993


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?

2229


Is it possible to share a view across multiple controllers?

971


What symbol would you use to denote, the start of a code block in razor views?

975


Explain Bundle.Config in ASP.Net MVC4?

1019


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

2584