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
Which string method is used for concatenation of two strings in c#?
When should I use static in C#?
We cannot create instances of static classes. Can we have constructors for static classes?
What is type keyword in c#?
How do namespaces work?
Explain the Usage of web.config
Is c# slower than java?
Explain About disco and uddi
What is difference between private and protected in c#?
What do you mean by generic class in c#?
What are strings in c#?
Why do we use virtual methods in c#?
Should I use double or float?
Explain the three test cases in unit testing?
What is the use of ienumerable in c#?