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

Can we have a non static member function in a base class to be override in derived with static modifier?

7 Answers   Wipro,


How?s the DLL Hell problem solved in .NET?

3 Answers  


what is an internal specifier? what happens internally when I use access specifier Internal ?

4 Answers   rsystems,


How many root nodes are there in an xml document?

0 Answers  


Which language is used for desktop application?

0 Answers  


How is the syntax written to inherit from a class in C#?Give an example ?

0 Answers   Siebel,


what are the different ways a method can be overloaded?

0 Answers   Siebel Systems,


what are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

1 Answers   4Cplus,


What is a void c#?

0 Answers  


Can c# inherit multiple classes?

0 Answers  


What is the difference between dynamic and var in c#?

0 Answers  


What is the difference between early binding and late binding in c#?

0 Answers  


Categories