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
Is c# pass by reference?
What is constants in c#?
What is the difference between wrapper class and primitive?
What is .cs file in c#?
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
What are abstract classes in c#?
What is a clr host?
What do you mean by synchronous and asynchronous operations?
Can we have multiple threads in one app domain?
What can we do to handle multiple exceptions?
Why constructor is used in c#?
What is a function c#?
Distinguish between a class and struct?
Explain about Threading Types.
What is linq c#?