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...


What is the use of giving more than one CATCH BLOCK in one
TRY block? Directly we can give that catch(Exception e)?Why
we go for arrayoutofbound Exception,divided by zero etc..?
Explain

Answers were Sorted based on User's Feedback



What is the use of giving more than one CATCH BLOCK in one TRY block? Directly we can give that cat..

Answer / kavitha

try with single catch block will catch what ever the
exception thrown by the code inside the try block but it
will not be clear..some time a code in a try block can throw
different type of exception.To catch the different type of
exception what our code throws we can use difference type
of catch for the single try block it will be more clear and
help full.

Is This Answer Correct ?    6 Yes 0 No

What is the use of giving more than one CATCH BLOCK in one TRY block? Directly we can give that cat..

Answer / raman

C# is not only an object oriented but real
scenariodevelopment.
Purpose of multiple catch block is to map the exact error
and handle it accordingly. Handling Exception e is the
worst type of development.

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More C Sharp Interview Questions

How will U encapsulate button trigger event into text_box event of Pressing Enter key?

3 Answers   TCS,


What is the benefit of delegate in c#?

0 Answers  


What do you mean by a windows process in regards to memory allocation?

0 Answers  


Can struct inherit from class c#?

0 Answers  


From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

0 Answers  


Why are c# strings immutable?

0 Answers  


What are most desktop applications written in?

0 Answers  


What are the 2 broad classifications of data types available in c#?

0 Answers  


What are the security issues if we send a query from the application?

1 Answers   Microsoft,


What are Regex / regular expressions ?

0 Answers   QuestPond,


When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)?

1 Answers  


Does C# support multiple inheritance?

5 Answers  


Categories