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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are circular references? How garbage collection deals with circular references.

535


What is difference between assembly and namespace?

471


write code for inserting and updating recoards in sql server database using connected architecture & records shoulds displayed in grid view ( use c# )

1921


Explain about Threading Types.

595


Explain About .NET Framework

527






How to get the sum of last 3 items in a list using lambda expressions?

506


Explain how to implement an object pool in c#.net

526


What is delegate in c# interview questions?

497


What kind of the information stored inside the assembly?

555


What are the new features in c# 2.0?

515


What is difference between class and abstract class in c#?

459


Is .net and c# the same?

556


Why do we use abstraction in c#?

474


What happens if you add duplicate elements to a set?

502


What is console readkey in vb net?

641